• 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
Re: Dynamic Menus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic Menus


  • Subject: Re: Dynamic Menus
  • From: Isaac Sherman <email@hidden>
  • Date: Fri, 28 Dec 2001 00:09:39 -0500

on 12/27/01 11:57 PM, you, Isaac Sherman, at the address,
email@hidden, wrote:

> I have a popup list that is supposed to be dynamically generated. In
> Interface Builder, I have an empty menu, and I have it connected to the
> instances of the popup (as the Menu outlet). In my code, I have it add
> items to the menu. I don't generate any errors, either.
> This might be a little sloppy, but here are the relevant points:
>
> -(void)awakeFromNib
> {
> NSEnumerator * myDictionaryEnum=[myDictionary keyEnumerator];
> myClass * currentClassTempItem=[[myClass alloc]init];
> SEL showOff=@selector(showStuff:);
> while ((currentClassTempItem=[alarmDictionaryEnum nextObject])!=nil)
> {
> [myMenu addItemWithTitle:[currentMenuItem getName]
> action:showOff//showStuff
> keyEquivalent:@""];
> }
> }
>
> <snip>
> - (IBAction)showOff:(id)sender
> {
> myClass * viewThisData=[[myClass alloc]init];
>
> viewThisData=[myDictionary objectForKey:[myMenu titleOfSelectedItem]];
> //The rest of the function is just putting data into fields, but I'm not
> getting any data!
>
> }
>
>
>
> Thanks.


Sorry! My Problem is that the popup button is just a title. Any Ideas?

Thanks again,

--
Isaac Sherman
MotaSoft Software (forthcoming)


  • Follow-Ups:
    • Re: Dynamic Menus
      • From: Isaac Sherman <email@hidden>
References: 
 >Dynamic Menus (From: Isaac Sherman <email@hidden>)

  • Prev by Date: Dynamic Menus
  • Next by Date: Re: MySQL and Cocoa
  • Previous by thread: Dynamic Menus
  • Next by thread: Re: Dynamic Menus
  • Index(es):
    • Date
    • Thread