I finally got this PrefGetAppPreferences function to work.
But, I can't figure out why it acts this way.

I have a Prefs structure declared globally.  
struct {
    Word  val;
    Boolean flag;
} Prefs;

I also have a Word declare for PrefSize.
Word PrefSize;

I execute:

PrefGetAppPreferences(CREATORID, 0, &Prefs, &PrefsSize, 0) from within the
StartApplication() function and the cooresponding Set within the
StopApplication() function.

My problem is that these only save preferences when:
Word PrefSize; is declared within the StartApplication() function.
If I declare it Globally, it does not work but reads and writes
all zeros, except the version.

I do not use PrefSize for anything but holding the size of the 
preferences returned.

Anybody have any guess why it works this way?  I have repeated this
a number of times.  Globally defined; does not work.  Locally within
the StartApplication; works.

Wierd!


--
-----------------------------------------------------------------
Discussion Group:        http://www.halcyon.com/ipscone/wwwboard/

Protect your constitutional rights. Your favorite one may be next!
-----------------------------------------------------------------

Reply via email to