Re: NSTableView with PopUpButtonCell column with different content per row

2010-02-22 Thread Sean McBride
On 2/20/10 9:31 AM, Matt Neuburg said: >>Thanks for this example. I've used this technique elsewhere and like it >>too, but alas as soon as you want menu separators in the popup this no >>longer works. Unless you are aware of some way... > >Sorry, I wasn't paying attention earlier in this thread

Re: NSTableView with PopUpButtonCell column with different content per row

2010-02-20 Thread Matt Neuburg
>Thanks for this example. I've used this technique elsewhere and like it >too, but alas as soon as you want menu separators in the popup this no >longer works. Unless you are aware of some way... Sorry, I wasn't paying attention earlier in this thread. But if the question is getting separators i

Re: NSTableView with PopUpButtonCell column with different content per row

2010-02-19 Thread Jerry Krinock
On 2010 Feb 19, at 13:30, Sean McBride wrote: > In my case currently, I need several separators and also an 'other...' > item that brings up an open panel. I don't know about the separators but I have done the 'Other...' item successfully. Referring to my previous message, define a new class c

Re: NSTableView with PopUpButtonCell column with different content per row

2010-02-19 Thread Sean McBride
On 2/18/10 4:13 PM, Jerry Krinock said: >Quincey's answer is excellent, and abstract. Let me give you a concrete >example from one of my projects. Presumably your table is bound to an >array controller whose contentSet or contentArray is bound to a >collection of Foo objects in your data model.

Re: NSTableView with PopUpButtonCell column with different content per row

2010-02-18 Thread Jerry Krinock
On 2010 Feb 18, at 13:30, Quincey Morris wrote: > you could simply have your window controller provide an array property with > version strings for the current OS (along with a KVO dependency to keep the > property in sync with the current OS), and bind the popup content to that > array. > >

Re: NSTableView with PopUpButtonCell column with different content per row

2010-02-18 Thread Quincey Morris
On Feb 18, 2010, at 12:38, Sean McBride wrote: > I'm looking for some pointers on how to have a TableView where one > column uses a PopUpButtonCell who's contents need to be different for > different rows. > > A contrived example: > > OS Name OS Version > > > So in the 'OS Vers

Re: NSTableView with PopUpButtonCell column with different content per row

2010-02-18 Thread Kyle Sluder
On Thu, Feb 18, 2010 at 12:38 PM, Sean McBride wrote: > So in the 'OS Version' column, I want the popup's contents to be either > one list or another list depending on 'OS Name' of any given row. > > Any suggestions? Hook yourself up as the delegate of the column's popup button cell's menu, and i

NSTableView with PopUpButtonCell column with different content per row

2010-02-18 Thread Sean McBride
Hi all, I'm looking for some pointers on how to have a TableView where one column uses a PopUpButtonCell who's contents need to be different for different rows. A contrived example: OS Name OS Version So in the 'OS Version' column, I want the popup's contents to be either one l