• 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
NSPopUpButton trouble
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPopUpButton trouble


  • Subject: NSPopUpButton trouble
  • From: Aaron Boothello <email@hidden>
  • Date: Sun, 04 Jan 2004 18:55:39 +0800

I'm using a drop down menu via NSPopUpButton in my App.
i update the menu using the following pseudo code:


-(void)updateMyPopUpButton
{
int x,selected;
[myPopUpButton removeAllItems];
for(x = 0;x<[mySuperModel getModelCounter];x++)
{
[myPopUpButton addItemWithTitle:(NSString *)[object[x] getTitle]];

if([object isObjectSelected])
selected = x;

}
[myPopUpButton selectItemAtIndex:selFlag];
}


here's the problem:
the last line of the code is where the app ALWAYS crashes, i comment it out and all is well. but id like to know why this is happening, and how to correct it.

Cheers,
Aaron.
_______________________________________________
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: NSPopUpButton trouble
      • From: p3consulting <email@hidden>
  • Prev by Date: Re: Document based app problems
  • Next by Date: Re: Warning when using NSSplitView (multiple declerations for method 'isVertical')
  • Previous by thread: re: any way to determine the encoding type of an NSData object?
  • Next by thread: Re: NSPopUpButton trouble
  • Index(es):
    • Date
    • Thread