gettingstarted
[Top] [All Lists]

RE: Preferences!?

To: "Getting Started" <gettingstarted at lists dot realsoftware dot com>
Subject: RE: Preferences!?
From: "Dixon, Tom" <dixont at Jostens dot com>
Date: Wed, 30 Mar 2005 08:38:48 -0600
Delivered-to: gettingstarted at lists dot realsoftware dot com
Thread-index: AcU1LLeKeQ8Wtz4wTBKScfA+Nya+5AAB91GQ
Thread-topic: Preferences!?
You should also take a look at XMLPreferences by Joseph Sharp.

http://homepage.mac.com/crystalballmac/software/RealBasicCode.html

This is a really nice method for saving preferences. So long as you are storing 
the user's current prefs in variables you can easily write them back any Time. 
I use this on both Windows and Mac code. .ini for Windows and .pref for Mac. I 
also have modified this module and created a new one called XMLSettings that 
allows me to save other settings for rarely needed non global items where I can 
specify both the folder and the file name, (usually settings stored in the 
application folder for unique functions).

Tom Dixon

-----Original Message-----
From: gettingstarted-bounces at lists dot realsoftware dot com 
[mailto:gettingstarted-bounces at lists dot realsoftware dot com] On Behalf Of 
Sean Arney
Sent: Wednesday, March 30, 2005 7:31 AM
To: RB Getting Started
Subject: Re: Preferences!?

Lars,

    If I could stick to a one word review: CLEAN

I wish I had seen this a year ago and I hope you have this well published to RB 
Garage, café etc.  Its got a ton more than just the prefs - menu handling, 
timer, static text sub class and Im sure more - this should be in every 
beginners tool box.  It shows a ton of great basic concepts, has even more 
comments than code and works nicely too!  I is good of you to offer it up to 
everyone as example work when it is a lot of work to prep it so cleanly - thank 
you.

-sean

>> I know that many programs have preferences that stay at the value 
>> that the user wants instead of reverting to the defaults. Is it 
>> possible for me to do this in REALBasic? If so, HOW?
> 
> It's not only possible, it's an excellent beginning project, because 
> you can re-use it and get the benefit in all future projects.
> 
> I use a text file in the PreferencesFolder (see that function name), 
> for ease of testing and debugging. If you want to see code, there's a 
> decent example of a Preferences module in my UTool template:
> 
>   http://ljensen.com/utool
> 
> lj
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> 
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>