Re: [Q] how to tell when drawing is done?
Re: [Q] how to tell when drawing is done?
- Subject: Re: [Q] how to tell when drawing is done?
- From: Ryan Stevens <email@hidden>
- Date: Wed, 4 Feb 2004 11:24:56 -0800
On Feb 4, 2004, at 10:03 AM, Steve Christensen wrote:
Is there a way to tell when all subviews of a certain view have
completed drawing themselves?
I have a NSWindowController managing a window that contains a
NSTabView that contains NSTableViews as subviews. When I switch to a
new tab (usually the first time), it's possible that the data source
supplying the table could take a little while to get its data in
order. I'd like to display a spinning NSProgressIndicator while all
this is going on until the views finish drawing.
I have no problem starting up the indicator in the tab view's
tabView:willSelectTabViewItem: delegate method, but I don't know where
to stop it. Ideas?
In your tableView's delegate...
- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell
forTableColumn:(NSTableColumn*)aTableColumn row:(int)rowIndex
{
if ( aTableColumn equals theFirstColumn and rowIndex equals 0)
// it's starting to draw...?
if ( aTableColumn equals theLastColumn and rowIndex equals
theNumberOfItems )
// it's (close enough to being) done drawing...?
}
That's what I would try first (looks easy enough to implement). Of
course, there's probably a better way but it's something to try,
anyway.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.