Re: NSIndexSet of NSButtonCells in NSOutlineView

2011-12-08 Thread Graham Cox
On 09/12/2011, at 8:22 AM, Gilles Celli wrote: > how do I detect which set if NSButtonCells are active ? You need to track that in your dataSource, NSOutlineView will not do it for you. As Quincey suggested, when your dataSource method -outlineView:setObjectValue:forTableColumn:byItem: is inv

Re: NSIndexSet of NSButtonCells in NSOutlineView

2011-12-08 Thread Gilles Celli
Ok as you suggested it's better to call it active Buttons in the OutlineView then selected... For the NSIndexSet: let's say that I've 3 ore more NSButtonCells, if only one is active then it will display only one Graph, if it has 2 activated let's say the first and last o

Re: NSIndexSet of NSButtonCells in NSOutlineView

2011-12-08 Thread Quincey Morris
NSButtonCells are based of NSMutableDictionary which will change > the integerValue of NSButton for their resp. key, this works. > > I've setup an NSArray to store the selected instruments. > In fact I've problems creating the NSIndexSet of the selected instruments and > not knowing wh

NSIndexSet of NSButtonCells in NSOutlineView

2011-12-08 Thread Gilles Celli
I've setup an NSArray to store the selected instruments. In fact I've problems creating the NSIndexSet of the selected instruments and not knowing where to put the whole code. Should I put the code in In outlineView: objectValueForTableColumn:byItem:(id)item or in outlineView:setObjectValue

Re: NSIndexSet

2008-11-21 Thread David Blanton
The easiest way is to make a mutable index set: NSMutableIndexSet *indices = [NSMutableIndexSet indexSet]; [indices addIndex:2]; [indices addIndex:4]; [indices addIndex:5]; Looks like the way ... thanks all! David Blanton ___ Cocoa-dev mailing l

Re: NSIndexSet

2008-11-21 Thread Randall Meadows
On Nov 21, 2008, at 8:44 AM, David Blanton wrote: How would one construct an NSIndexSet containing the indices 2,4,5 ? I did: NSRange two = NSMakeRange(2, 1); NSRange four = NSMakeRange(4, 1); NSRange five = NSMakeRange(5, 1); NSRange u1 = NSUnionRange(two,four

Re: NSIndexSet

2008-11-21 Thread Greg Titus
On Nov 21, 2008, at 7:44 AM, David Blanton wrote: How would one construct an NSIndexSet containing the indices 2,4,5 ? I did: NSRange two = NSMakeRange(2, 1); NSRange four = NSMakeRange(4, 1); NSRange five = NSMakeRange(5, 1); NSRange u1 = NSUnionRange(two,four

Re: NSIndexSet

2008-11-21 Thread Michael Ash
On Fri, Nov 21, 2008 at 10:44 AM, David Blanton <[EMAIL PROTECTED]> wrote: > > How would one construct an NSIndexSet containing the indices 2,4,5 ? > > I did: > >NSRange two = NSMakeRange(2, 1); >NSRange four = NSMakeRange(4, 1); >N

Re: NSIndexSet

2008-11-21 Thread Jean-Daniel Dupas
Le 21 nov. 08 à 16:44, David Blanton a écrit : How would one construct an NSIndexSet containing the indices 2,4,5 ? I did: NSRange two = NSMakeRange(2, 1); NSRange four = NSMakeRange(4, 1); NSRange five = NSMakeRange(5, 1); NSRange u1 = NSUnionRange(two

Re: NSIndexSet

2008-11-21 Thread Nick Zitzmann
First of all, when you want to create a new topic, please do not ever reply to an existing message. This breaks threading, since this thread now has two topics instead of one. Thanks. On Nov 21, 2008, at 8:44 AM, David Blanton wrote: How would one construct an NSIndexSet containing the

NSIndexSet

2008-11-21 Thread David Blanton
How would one construct an NSIndexSet containing the indices 2,4,5 ? I did: NSRange two = NSMakeRange(2, 1); NSRange four = NSMakeRange(4, 1); NSRange five = NSMakeRange(5, 1); NSRange u1 = NSUnionRange(two,four); NSRange u2 = NSUnionRange(u1,five

Re: NSIndexSet isEqual: sent to deallocated instance

2008-10-08 Thread Gordon Apple
The question I would ask is if you are using a KVC compliant method when "Under some circumstances the the backing array is refreshed with new content". Otherwise, the changes might not be registered everywhere they need to be. NSIndexSet is a non-mutable object that gets replaced wh

Re: NSIndexSet isEqual: sent to deallocated instance

2008-10-08 Thread Ron Lue-Sang
ty well. Under some circumstances the the backing array is refreshed with new content. When this happens, sometimes, not always, an error is thrown: *** -[NSIndexSet isEqual:]: message sent to deallocated instance 0x184de440 #0 0x92028907 in ___forwarding___ #1 0x92028a12 in __for

NSIndexSet isEqual: sent to deallocated instance

2008-10-08 Thread Steve Cronin
ay is refreshed with new content. When this happens, sometimes, not always, an error is thrown: *** -[NSIndexSet isEqual:]: message sent to deallocated instance 0x184de440 #0 0x92028907 in ___forwarding___ #1 0x92028a12 in __forwarding_prep_0___ #2 0x967fadb9 in _NSValuesAreEqua