Problem with reading Preferences file

Charles Szasz cszasz at mac.com
Sun Nov 13 13:14:31 EST 2011


I am able to set up Preferences for my app. But the following script in the preOpenStack will NOT retrieve the data Preferences.  Here is my script:

IF the platform is "MacOS" then 
      if there is a file (specialFolderPath(26) & "/" & "mileage_prefs") then
         put url ("binfile:" & specialFolderPath("preferences") & "/" & "mileage_prefs") into tPrefs

         put tPrefs["name"] into field "name" of card "one" of stack "mileage report"
         put tPrefs["name"] into field "name" of card id 1002 of stack "prefs"
   end if
end if

I also have the same problem on the Windows version of my app:

IF the platform is "win32" then
      if there is a file (specialFolderPath(26) & "/" & "mileage_prefs") then 
         put url ("binfile:" & specialFolderPath(26) & "/" & "mileage_prefs") into tPrefs
         
         put arrayDecode(tPrefs) into tPrefs
         put tPrefs["name"] into field "name" of card "one" of stack "mileage report"
         put tPrefs["name"] into field "name" of card id 1002 of stack "prefs"
    end if
end if

Any suggestions would be greatly appreciated!!!

Charles Szasz
cszasz at mac.com







More information about the use-livecode mailing list