FROM : Steve Weller
DATE : Sat Mar 29 16:31:32 2008
On Mar 28, 2008, at 11:27 AM, Lincoln Green wrote:
> I followed your suggestion, and it worked great! However, when I
> delete the preferences file form /Library/Preferences/, my
> application won't put up a window. Any suggestions to get around this?
Check the console window in Xcode and then start debugging.
Of course I didn't post all my code, so you may have failed to
initialize NSUserDefaults yourself. Here is what I have in my app
controller:
// Early set up
+ (void)initialize
{
// Set up initial defaults
NSDictionary *defaultValues = [NSDictionary
dictionaryWithObjectsAndKeys:
[NSArchiver archivedDataWithRootObject:[NSColor whiteColor]],
@"browserBackgroundColor",
[NSNumber numberWithInteger:1], PrefsVersion,
[NSNumber numberWithInteger:1], AppVersion,
nil];
// Set up default values for preferences managed by
NSUserDefaultsController
[[NSUserDefaults standardUserDefaults]
registerDefaults:defaultValues];
>
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
--
Blog: Photos: <A href="http://bagelturf.smugmug.com/">http://bagelturf.smugmug.com/
DATE : Sat Mar 29 16:31:32 2008
On Mar 28, 2008, at 11:27 AM, Lincoln Green wrote:
> I followed your suggestion, and it worked great! However, when I
> delete the preferences file form /Library/Preferences/, my
> application won't put up a window. Any suggestions to get around this?
Check the console window in Xcode and then start debugging.
Of course I didn't post all my code, so you may have failed to
initialize NSUserDefaults yourself. Here is what I have in my app
controller:
// Early set up
+ (void)initialize
{
// Set up initial defaults
NSDictionary *defaultValues = [NSDictionary
dictionaryWithObjectsAndKeys:
[NSArchiver archivedDataWithRootObject:[NSColor whiteColor]],
@"browserBackgroundColor",
[NSNumber numberWithInteger:1], PrefsVersion,
[NSNumber numberWithInteger:1], AppVersion,
nil];
// Set up default values for preferences managed by
NSUserDefaultsController
[[NSUserDefaults standardUserDefaults]
registerDefaults:defaultValues];
>
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
--
Blog: Photos: <A href="http://bagelturf.smugmug.com/">http://bagelturf.smugmug.com/
| Related mails | Author | Date |
|---|---|---|
| Lincoln Green | Mar 24, 17:02 | |
| Cathy Shive | Mar 24, 17:06 | |
| Sherm Pendley | Mar 24, 17:11 | |
| Jonathan Hess | Mar 24, 20:37 | |
| Bertil Holmberg | Mar 24, 22:39 | |
| Gerd Knops | Mar 24, 23:27 | |
| Steve Weller | Mar 25, 01:58 | |
| Lincoln Green | Mar 28, 19:27 | |
| Steve Weller | Mar 29, 16:31 |






Cocoa mail archive

