• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
A very weird problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: A very weird problem
      • From: Brent Gulanowski <email@hidden>
  • Prev by Date: Re: [ANN] F-Script 1.2: Interactive Cocoa
  • Next by Date: Re: NSFileManager and aliases
  • Previous by thread: Re: Looking for a time entry control for Cocoa
  • Next by thread: Re: A very weird problem
  • Index(es):
    • Date
    • Thread