views:

126

answers:

2

My question is based on another question. Instead of repeating a bunch of stuff, I hope it's okay that I refer you to that other question instead:

http://stackoverflow.com/questions/1203698/show-nssegmentedcontrol-menu-when-segment-clicked-despite-having-set-action/

My question is: How would the code within [self showGearMenu] look like, i.e. how would one actually use the popUpContextMenu:withEvent:forView method to accomplish what the poster of the other question wants?

I ask because it seems that the question was resolved for the poster, but he never shared with us how he actually popped up the menu :)

+1  A: 

I had this question a couple months ago, which I asked on Cocoa-dev:

http://www.cocoabuilder.com/archive/cocoa/275771-trouble-with-nssegmentedcontrol.html#275771

The code that was emailed to me off-list works great, but it's not my code, so I'm going to post it. However if you'd like it, contact Seth at Araelium Group about AGNSSegmentedControl: http://www.araelium.com/

Dave DeLong
+2  A: 

http://www.sethwillits.com/temp/AGNSSegmentedControl.h (also .m)

Seth Willits