Sorry for the dumb question , but how do I reference popup button cells in tables? I basically need to get the title of the popup button.
I tried it like this:
set thePopupTitle to contents of popup button cell 1 of theRow of theDatasource
set thePopupTitle to title of popup button cell 1 of theRow of theDatasource
That doesn’t work.
If you are referencing a data cell, the “data cell” is replaced with the custom class you are inserting in IB , correct? ie imageCell,textviewcell etc.
Many Thanks !
If I understand correctly the info in the thread below to do with “Control View Suite” could be of assistance.
something like: (taken from the thread above)
set my severity to title of current cell of matrix “severity”
or something like
set _item to title of current menu item of popup button “_item” of window “main” as text
Thanks for the link Budgie ! I checked out the docs but couldn’t get the matrices to work. I don’t think that matrices are what I’m looking for. However, I read further about Image cells and so on and discovered there are no references to “Popup Button Cells” in tables. So after reading about other handlers connected to “Popup Buttons” I found another way of getting the title from “Popup Button Cells”.
In IB drag a popup button cell to the colomn in the table. Select the colomn cell. Give it a name .eg “theMountstateButton” . Select the “Action Clicked” handler. Then simply reference the button like this:
on clicked theObject
if the name of theObject is equal to "theMountstateButton" then
set thePopoupbutton to title of theObject
There is one problem though. When you select the menu item in the popup button cell the “Clicked” handler doesn’t always register the selection correctly. Not sure why.
Because of this I gave up on “Popup Button Cells” and found another way to acomplish what I need.