ini file question on the Mac

Phil Davis revdev at pdslabs.net
Mon Aug 11 17:44:15 EDT 2008


mfstuart wrote:
> Hi Phil, thanx for your reply.
>
> But, is this a Mac OS policy that a preference file has to go into this
> ...appPrefs/ folder?
>   

Actually I meant for 'appPrefs' to be the filename, and I wrote it that 
way to show that you can have a file with no extension. (Additionally I 
mangled the statement by leaving out the "&" before "appPrefs") - but I 
digress...

> Or can the preference file reside with the application?
>
>   
Personally, I've done it both ways - prefs in an app subfolder, or prefs 
in the Preferences folder (or in my app's subfolder in the Preferences 
folder when I need to store multiple files there). The OS will allow a 
prefs file to be anywhere, and be named anything. It won't display a 
warning if you don't do things in a prescribed way.

That said, there are usually reasons why prescribed ways are, well, 
prescribed. Someone else will be better versed on the why's and 
wherefore's of that than myself. (Sounds like a Gaskin topic to me!)

Phil
>   
> You see, I don't have a Mac to know these things.
> I'll have to get with a friend who has one.
>
> Regards,
> Mark Stuart
>
>
> Phil Davis-5 wrote:
>   
>> Hi Mark,
>>
>> mfstuart wrote:
>>     
>>> Hi Mark,
>>> Yes, I need to store preferences for an application on any of the Mac OS
>>> versions.
>>> This application is a single user standalone application.
>>> So I would need to know the path and filename extension for this
>>> preferences
>>> file.
>>>   
>>>       
>> In Rev, this should give it to you:
>>
>>   put specialFolderPath("Preferences") "/appPrefs" into tMyPrefsFile
>>     
>>  
>> AFAIK, any (or no) file extension can be used... but there may be a 
>> preferred extension that I'm ignorant of. You might take a look in the 
>> folder whose path is returned and see what is used by others.
>>
>> Also, Ken Ray has a very nice list of specialFolderPath() values that 
>> will take you pretty much wherever you want to go in the OS:
>>
>> http://sonsothunder.com/devres/revolution/tips/file010.htm
>>
>> HTH -
>> Phil Davis
>>
>>     
>>> On Windows, I would typically put this preferences file in the same
>>> folder
>>> as the executable.
>>> Filename: appname.ini
>>> Would I assume the same on Mac?
>>> Filename: appname.???  --this is where I need the correct filename
>>> extension
>>> for the Mac OS.
>>>
>>> Regards,
>>> Mark Stuart
>>>
>>>
>>>
>>> Mark Schonewille-3 wrote:
>>>   
>>>       
>>>> Hi Mark,
>>>>
>>>> This is not the right question. What do you want to achieve?
>>>>
>>>> Do you want to store user settings? Do so in a preferences file in ~/ 
>>>> user/library/preferences.
>>>>
>>>> Do you want tweak how the OS deals with your standalone? Plist might  
>>>> be your friend.
>>>>
>>>> Want to store some default settings for when the application is  
>>>> launched for the first time? Why not simply a custom property?
>>>>
>>>> --
>>>> Best regards,
>>>>
>>>> Mark Schonewille
>>>>
>>>> Economy-x-Talk Consulting and Software Engineering
>>>> http://economy-x-talk.com
>>>> http://www.salery.biz
>>>>
>>>> Benefit from our inexpensive hosting services. See
>>>> http://economy-x-talk.com/server.html 
>>>>   for more info.
>>>>
>>>> On 11 aug 2008, at 17:47, mfstuart wrote:
>>>>
>>>>     
>>>>         
>>>>> Hi all,
>>>>>
>>>>> Please excuse my Mac ignorance as I'm a totally Windows guy, but...
>>>>>
>>>>> As is an ini file for a Windows application, so is a ??? file on the  
>>>>> Mac OS.
>>>>> Could someone help me by "filling in" the ??? blank for the Mac OS?
>>>>>
>>>>> Regards,
>>>>> Mark Stuart
>>>>> -- 
>>>>> View this message in context:
>>>>> http://www.nabble.com/ini-file-question-on-the-Mac-tp18928420p18928420.html
>>>>> Sent from the Revolution - User mailing list archive at Nabble.com.
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>>       
>>>>>           
>>>> _______________________________________________
>>>> 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
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>> -- 
>> Phil Davis
>>
>> PDS Labs
>> Professional Software Development
>> http://pdslabs.net
>>
>> _______________________________________________
>> 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
>>
>>
>>     
>
>   

-- 
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net




More information about the use-livecode mailing list