I am working on a program in which the User manages up to visible 32 Slider control sets.
In each set is a Slider, a text field which displays the numeric value of the slider, and a static display of the name of the slider.
I want to give the User control of certain properties of the slider like Enabled, Max, Min, or Markers Left/Right.
Following example posts on this site I was able to partially implement a Contextual Menu solution.
I dragged in a new instance of a menu object in IB (“Contextual_Menu”). Then I Control-Dragged a connection between the each static text field and the “Contextual Menu.” I can build the project and Voila!
Right-clicking any of the text labels reveals my Contextual Menu.
I have given all the elements AppleScript names. I can connect a menu item to a “choose menu item theObject” handler, but that only results in a 3(1) error.
To be honest I’m not sure that approach would work anyway. I need to know both the menu item selected (eg “Set Min”) AND the originating text field (eg “Slider 23 Label”). If I try to appproach it from a NSTextField Event, I don’t have the availability of even “mouse up theObject event theEvent” handler which might pass me sufficient parameters.
Am I completely barking up a tree? From an interface standpoint it works wonderfully. I can handle everything once I get which menu item was selected and which slider it refered to. When I read the previous posts on Contextual Menus I got the feeling that they “magically worked - oops broken again - cry.” That was 2004. Have I missed a simple tutorial since then that explains how to RELIABLY implement CONTEXTUAL menus (my Main Menu stuff works fine.) Does this just not work under Tiger? Any help would be greatly appreciated.