Re: Help with this crashing method
Re: Help with this crashing method
- Subject: Re: Help with this crashing method
- From: Bill Bumgarner <email@hidden>
- Date: Sun, 09 Nov 2008 21:16:32 -0800
On Nov 9, 2008, at 9:03 PM, Andre Masse wrote:
+ (void) initialize
{
NSMutableDictionary *defaultValues = [NSMutableDictionary
dictionary];
NSMutableDictionary *userDict = [NSMutableDictionary dictionary];
[userDict setObject:[NSImage imageNamed:NSImageNameUser]
forKey:@"userImage"];
[userDict setObject:NSFullUserName() forKey:@"userFullName"];
[userDict setObject:NSUserName() forKey:@"loginName"];
[userDict setObject:[NSString stringWithString:@""]
forKey:@"loginPassword"];
[userDict setObject:[NSString stringWithString:@"localhost"]
forKey:@"loginHost"];
[userDict setObject:[NSString stringWithString:@"tdhsql"]
forKey:@"loginDatabaseName"];
[userDict setObject:[NSString stringWithString:@"5432"]
forKey:@"loginPort"];
NSMutableArray *applicationUsers = [NSMutableArray
arrayWithObject:userDict];
[defaultValues setObject:applicationUsers
forKey:@"applicationUsers"];
// register it
[[NSUserDefaults standardUserDefaults]
registerDefaults:defaultValues]; <--- crash here
}
Any help someone so I can go to sleep :-)
You can't directly or indirectly set an NSImage as a value for a
default. Try removing the @"userImage" key and see if it still
crashes.
b.bum
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden