Re: NSMenu in NSTableView column

2014-08-13 Thread Jonathan Taylor
>> Ah, I've worked out the underlying problem I've been having. I had been >> trying things along these lines and completely failing to get the popup menu >> to populate correctly. It was working for a standalone popup but not within >> the table, and I was assuming I was doing something wrong a

Re: NSMenu in NSTableView column

2014-08-13 Thread Keary Suska
On Aug 13, 2014, at 4:04 AM, Jonathan Taylor wrote: >> I would create a class, say, SignalChannel, with "name" (for description, >> but we may not ant to use "description" for obvious reasons...) and >> "channelID" properties. I would then populate the NSPopupButtonCell with >> SignalChannel

Re: NSMenu in NSTableView column

2014-08-13 Thread Jonathan Taylor
> I would create a class, say, SignalChannel, with "name" (for description, but > we may not ant to use "description" for obvious reasons...) and "channelID" > properties. I would then populate the NSPopupButtonCell with SignalChannel > objects. This will abstract the model from the view, which

Re: NSMenu in NSTableView column

2014-08-12 Thread Keary Suska
On Aug 12, 2014, at 12:14 PM, Jonathan Taylor wrote: My question then is how should I access the tags in the popup menu in order to work out which tag corresponds to the selected item in each row? >>> >>> If I understand your setup correctly, the most direct route is to set an >>>

Re: NSMenu in NSTableView column

2014-08-12 Thread Jonathan Taylor
>>> My question then is how should I access the tags in the popup menu in order >>> to work out which tag corresponds to the selected item in each row? >> >> If I understand your setup correctly, the most direct route is to set an >> action on each menu item. > > Ah ok, I've revisited that and

Re: NSMenu in NSTableView column

2014-08-12 Thread Jonathan Taylor
>> My question then is how should I access the tags in the popup menu in order >> to work out which tag corresponds to the selected item in each row? > > If I understand your setup correctly, the most direct route is to set an > action on each menu item. Ah ok, I've revisited that and got it t

Re: NSMenu in NSTableView column

2014-08-12 Thread Keary Suska
On Aug 12, 2014, at 6:14 AM, Jonathan Taylor wrote: > I am trying to implement a popup menu in an NSTableView column. I seem to > have the bindings all set up so that the values in my NSArray are updated > according to the options the user selects in the table. However, I would like > to hav

NSMenu in NSTableView column

2014-08-12 Thread Jonathan Taylor
Hi all, I am trying to implement a popup menu in an NSTableView column. I seem to have the bindings all set up so that the values in my NSArray are updated according to the options the user selects in the table. However, I would like to have some way of accessing the tag on the menu item that w