Save field text to file

Sarah Reichelt sarah.reichelt at gmail.com
Sun Dec 10 18:25:19 EST 2006


After getting a file name from the user, you might then want to check
to make sure they didn't delete the ".txt" file extension if that is
important.

Cheers,
Sarah


On 12/11/06, Adrian Williams <adrian at clubtype.co.uk> wrote:
> Thanks Mark,
> That works a treat.
> I still getting used to Rev doing stuff like "it" without me asking for
> "it"!
> The --comments REALLY help.
> Adrian
>
> On 10 Dec 2006, at 16:16, Mark Schonewille wrote:
>
> > case "Save"
> >   ask file empty with "Untitled.txt"
> >   -- now, the variable 'it' contains a file path or
> >   -- it is empty if the user pressed Cancel
> >   if it is not empty then
> >     put it into myFile
> >     -- set filetype before creating a file
> >     set the filetype to "ttxtTEXT"
> >     put fld "edtText" into url ("file:" &  myFile)
> >   end if
> >   break
> >
> ______________________
> Club Type
> http://www.clubtype.co.uk
> adrian at clubtype.co.uk
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list