A very weird problem
A very weird problem
- Subject: A very weird problem
- From: Jesus De Meyer <email@hidden>
- Date: Tue, 16 Apr 2002 22:54:44 +0200
Here is the code of a method:
//snippet from a method used at awakeFromNib
for (i = 0; i < [skinFiles count]; i++) {
[skinMenu insertItemWithTitle:[[skinFiles objectAtIndex:i]
stringByDeletingPathExtension] action:@selector(handleSkinMenu:)
keyEquivalent:@"" atIndex:i+1];
}
//method for menuItems
- (void)handleSkinMenu:(id)sender {
int item = [skinMenu indexOfItem:sender];
if (item == 0) {
skinStr = @"default";
} else {
NSLog(@"Showing skinFolderPath");
NSLog([NSString stringWithFormat:@"SkinFolderPath +
SkinFiles[0]: %@/%@", skinFolderPath, [skinFiles objectAtIndex:0]]);
//SIGBUS error!
}
}
The problem is that for some reason I can't get the NSString of some
strings stored elsewhere in the method that I use to set an action to a
menuitem. When I do the same NSLog call on an other method, it works
perfect, but in the handleSkinMenu it crashes when I select an item
bigger than 0.
Does anyone know how to solve this?
______________________________
Jesus De Meyer
CEO @ E dot software
http://homepage.mac.com/edotsoftware
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.