Re: Updates in one split view pane causing other pane to redraw (on Tiger): SOLVED
Re: Updates in one split view pane causing other pane to redraw (on Tiger): SOLVED
- Subject: Re: Updates in one split view pane causing other pane to redraw (on Tiger): SOLVED
- From: Martin Redington <email@hidden>
- Date: Tue, 25 Mar 2008 03:15:55 +0000
It turns out this was due to a misplaced -[NSView setNeedsDisplay]
call in my custom cell's drawing method.
Every time the cell was drawn, it would set the needsDisplay flag, so
when the window checked the views to see if they needed display, the
table view did.
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
// Some code
// Don't do this.
[controlView setNeedsDisplay:YES];
// Some more code
}
On 21 Mar 2008, at 13:52, Martin Redington wrote:
In my app I have a split view (actually an RBSplitView). The left
hand pane contains a table view representing disk volumes, and the
right hand split view contains an NSOutlineView listing files and
directories.
When I update item in the files view, I'm *sometimes* seeing the
volume view rows redrawing as well.
For example, I start the application, and move the selection up and
down with the arrow key in the files view. The volumes view
(correctly) does not redraw.
However, if I switch focus to the volume view, and then back to the
files view, and do the same thing again, the volumes view starts
receiving setNeedsDisplay: messages when the files view updates.
Clicking in the empty rows of the volumes view and then switching
back to the files view seems to "break" the connection, and the
setNeedsDisplay: messages stop getting sent.
It looks like some kind of internal state is getting set/unset that
is causing the volumes view to update unnecessarily, but I can't
work out what it is. Inspection of the obvious properties in F-
Script shows nothing.
It seems to make no difference whether the volumes view's data is
set using bindings to the columns or using a datasource.
Does this ring any bells with anyone?
_______________________________________________
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:
40ucl.ac.uk
This email sent to email@hidden
_______________________________________________
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