Ongoing user defaults problem

I’m having an odd recurring problem with my user defaults.

I’ve succesfully built an ASS app and when I set my build to release all of a sudden my preferences are not updating anymore. The odd thing is that when I go back to my original debug built the same occurs. I’ve tried to hardwire new defaults in the code but when I launch the app the old ones are still loaded in the app even though all references to reading defaults are commented out. I tried deleting all instances of my app and rebuilt a new one but even this new app is loading with the old defaults (even though the code never says to load user defaults).

Suggestions on how to solve this odd problem are HIGHLY appreciated!!!

I actually tracked down the problem.

The cause was actually two-fold:

  1. There was still an error in my error handling which didn’t go noticed before; no error notices given
  2. The app had to quit through killall and the preferences didn’t write normally

I solved the first error. The second error I solved by including the following in my prefs handling code:

call method "synchronize" of object user defaults