I’m trying to get a pulldown button into my table view so that columns can be hidden and shown. It works up to a point, at which I’m baffled.
Here’s what I’m doing:
In IB, I drag a Custom View into the nib, drag a popup button into that Custom view, set it to a mini borderless pulldown, resize the button so it will fit in the corner. The Custom View and the popup button each have an AppleScript name. I connect a choose menu item handler to each menu item.
I connect the button to the Table View by Control-dragging from the Table View to the popup button, and connect the Table View’s corner view to the popup (in the Outlets tab of the Connections info window for the Table View).
I Test the Interface in IB; the popup button displays in the corner view and is clickable, menu items display. Fine.
I Build the app; the popup button displays in the corner view. Fine.
BUT, when I click the popup button I get an NSReceiverEvaluationScriptError: 4(1) (which seems to imply that the object path is futzed?) and the choose menu item handler does not get called.
I have tried a similar approach using just a button instead of the popup and get the same dubious results. In this particular case the actual object path to the corner view is: button id 69 of scroll view id 6 of window id 2. So it does exist.
What do you suppose I am doing wrong? Have I left a step out somewhere along the line?
Thanks for any help.