Re: NSBrower selectedCells lies
Re: NSBrower selectedCells lies
- Subject: Re: NSBrower selectedCells lies
- From: Graham Cox <email@hidden>
- Date: Fri, 23 May 2008 12:30:45 +1000
Check whether anything in your delegate is throwing an exception
(NSAssert can throw an exception btw). That might be interrupting the
update loop.
hth,
G.
On 23 May 2008, at 10:44 am, Martin Redington wrote:
I've made some progress in hunting this down, although it seems a
little weird.
Basically, in an NSBrowser, if you have a column with, for example,
three items, and you click on another,
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView
*)controlView
gets called a few times for each item, with the the selectedCells
values changing appropriately and correctly during the sequence and
calls.
In the case I'm running into, drawInteriorWithFrame only gets called
for some of the items, and only once, so the calls for the later, new
value of selectedCells are never made (hence "selectedCells lies").
*Something* seems to be stopping the later updates.
I have a test case that replicates this behaviour, with a fairly
minimal classes. Oddly, when I set the the browser's focusRingType to
NSFocusRingTypeNone, programmatically or in the nib, I get exactly the
same behaviour as in my test case. When I leave it set to the default,
I get the correct number and sequence of drawInteriorWithFrame: calls.
I'll file a bug for this later on.
Frustratingly, when I drop my app's browser classes into my minimal
test case, they seem to work ok. The only real difference left is in
my browser delegate methods - I wouldn't have expected them to break
this, but then I wouldn't have expected NSFocusRingTypeNone to either.
If anyone has any clues as to what might be going on here, that would
be great ...
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden