Close File question

charles61 cszasz at mac.com
Tue Oct 26 11:42:48 EDT 2010


Hi Mark,

This is the script that I have tried using the close command for "Don't Save". I tried the following which did not work in the script below: 
Close file "file:" & gOpenDataFile


case "New Student Referral"
      go to card "referral"  
      
      if field "first" of card "referral" is not empty then ---> Name field is not empty.
         if gOpenDataFile is not empty then  ---> A saved file is open.
            set the itemDel to "/"
            put item -1 of gOpenDataFile into tFileName
            answer warning "Save changes to " & tFileName &"?" with "Don't Save" or "Cancel" or "Save" titled "Save File"
            
            --->answer warning "Save changes to: "with "Don't Save" or "Cancel" or "Save" titled "Save File?"
            --->Your changes will be lost if you do not save them.
            
            if it = "Don't Save" then close file "file:" & gOpenDataFile -->New 10-25-10: Close file 
            

Charles Szasz
cszasz at mac.com




On Oct 26, 2010, at 11:33 AM, Mark Schonewille-3 [via Runtime Revolution] wrote:

> Charles, 
> 
> No, you must use the close file command. 
> What makes you think you're unable to do so? 
> You could also use get URL or put URL instead of open-read/write-close. 
> 
> -- 
> Best regards, 
> 
> Mark Schonewille 
> 
> Economy-x-Talk Consulting and Software Engineering 
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553 
> 
> Download the Installer Maker plugin for Runtime Revolution at http://qurl.tk/ce Create installers for Mac and Windows on *every* Rev-compatible platform. No additional software needed. 
> 
> On 26 okt 2010, at 17:29, charles61 wrote: 
> 
> > 
> > I have the name and location of a file in a variable, gOpenDataFile. For 
> > example: 
> > /Users/cszasz/Documents/School Personnel/Tom Jones.txt 
> > 
> > Can I use the following: Put empty into gOpenDataFile to close a file? The 
> > reason I ask is that I have been unable to use the Close File command to 
> > close files. 
> 
> 
> _______________________________________________ 
> use-revolution mailing list 
> [hidden email] 
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences: 
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> 
> View message @ http://runtime-revolution.278305.n4.nabble.com/Close-File-question-tp3013929p3013938.html 
> To unsubscribe from Close File question, click here.
> 


-- 
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Close-File-question-tp3013929p3013959.html
Sent from the Revolution - User mailing list archive at Nabble.com.



More information about the Use-livecode mailing list