fileType problems
Richard Gaskin
ambassador at fourthworld.com
Tue May 25 18:26:32 EDT 2004
Frank Leahy wrote:
> I'm setting the fileType to "FJL3PREF" for my preferences files, but
> I've noticed that this value is being used on *all* files I create, not
> just my preferences files.
>
> I thought this value would be handler specific, i.e. it would be set to
> empty after the handler finished. Unfortunately I'm finding that JPEG
> files that my app creates with "export image ... as JPEG" have this
> fileType as well.
>
> Should I set the fileType to empty after I've written the prefs file?
> Or "????????"? Or something else?
The fileType property is persistent, initialized to "ttxtTEXT".
For temporary use you'll probably want to save the current value and
restore it when you're done:
on SavePrefs
global gPrefsData
local tSaveType
put the fileType into tSaveType
set the fileType to "FJL3PREF"
put gPrefsData into \
url ("file:"&specialFolderPath("Preferences")&"/MyAppPrefs")
set the fileType to tSaveType
end SavePrefs
--
Richard Gaskin
Fourth World Media Corporation
___________________________________________________
Rev tools and more: http://www.fourthworld.com/rev
More information about the use-livecode
mailing list