• 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
Adding items to a PopUp menu from an Array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding items to a PopUp menu from an Array


  • Subject: Adding items to a PopUp menu from an Array
  • From: Ryan Zachary Hale <email@hidden>
  • Date: Mon, 24 Mar 2003 20:39:56 -0600

In my Cocoa app I would like to add items to a submenu for each "record"
in an NSMutableArray. For example: it the user has added the title "Work
Sig" to the record, I want my submenu to show "Work Sig" as an item.

This is all I need for now, but I eventually (i.e. this weekend:) ) want
the menu item to invoke an action that inserts the value for the record,
so in the previous example it would insert the users Work Signature.
Right now I have a MutableArray and a dictionary for each "item" (Name
and then Text).

I tried addItemsWithTitles:myArray but this seems to have problems,
because I have two values, SiteName and SitePath, and all I want is
SiteName.
_______________________________________________
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.

  • Prev by Date: Re: policy question
  • Next by Date: Re: socket sample in cocoa
  • Previous by thread: Re: policy question
  • Next by thread: String subtraction
  • Index(es):
    • Date
    • Thread