[comp.sys.mac.programmer] storage in DA's

sam@uhura.neoucom.EDU (Scott A. Mason) (12/01/90)

I'm writing a desk accessory that needs to maintain a small database.
Since the database is small (< 40 items) I have decided to use STR#
structures in the resource file.  I have the routines working that maintain
the database from the dialog boxes, but when I go to update and write the
resource file, the changes will not be saved permanently.  The changes will,
however, show up upon any subsequent call to the DA before the machine is 
shutdown.  They are not seen upon a reboot.  

What am I missing here?
-- 
--------------------------------------------------------------------------------
"If it ain't broke, don't fix it," and certainly don't blame me.
UUCP:  {pitt,lll-winken,usenet,aablue}!neoucom!sam   INTERNET:  sam@neoucom.EDU
Scott A. Mason, Coordinator of Systems Operations, NEOUCOM

rad@genco.bungi.com (Bob Daniel) (12/03/90)

In article <1990Dec01.014848.1191@uhura.neoucom.EDU> sam@uhura.neoucom.EDU (Scott A. Mason) writes:
>I'm writing a desk accessory that needs to maintain a small database.
>Since the database is small (< 40 items) I have decided to use STR#
>structures in the resource file.  I have the routines working that maintain
>the database from the dialog boxes, but when I go to update and write the
>resource file, the changes will not be saved permanently.  The changes will,

Before writing the resource, you need to do a ChangedResource(resHandle) or else
it won't be written out.  WriteResource will only write if the resChanged 
resource attribute is set.


_________
moof moof