Problem with refreshing NSMenuItems
Problem with refreshing NSMenuItems
- Subject: Problem with refreshing NSMenuItems
- From: Prime Coderama <email@hidden>
- Date: Wed, 07 Mar 2012 19:40:00 +1100
I have an NSMenu with the following static NSMenuItems
1. NSMenuItem "Count of people" (hidden)
2. NSMenuItem <Separator> (hidden)
3. NSMenuItem <Separator>
4. NSMenuItem "Refresh List"
5. NSMenuItem <Separator>
6. NSMenuItem "Quit"
I then dynamically add n-amount of NSMenuItems between (2) and (3). This works great.
The problem I am having, is when I hit "Refresh", I am unsure on how to remove all of the dynamically added NSMenuItems from the NSMenu and add all of the new ones?
I am currently causing a mess using NSMenu:removeItemAtIndex.
Any suggestions?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden