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
AND
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.
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”.
Here’s how,
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
end if
end clicked
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.