Re: Trying to hide a NSProgressIndicator upon finishing of table rendering
Re: Trying to hide a NSProgressIndicator upon finishing of table rendering
- Subject: Re: Trying to hide a NSProgressIndicator upon finishing of table rendering
- From: Graham Cox <email@hidden>
- Date: Sun, 15 Mar 2015 14:45:22 +1100
> On 14 Mar 2015, at 4:43 pm, Patrick J. Collins <email@hidden> wrote:
>
> Is there a way to determine when the table has actually finished drawing
> itself so I can hook into that?
You probably want to rethink what you mean by "processing of data". The table ALWAYS lazy loads, and only asks your data source for the row it needs when it needs them. The user scrolls, more rows needed, your data source supplies them. This is all VIEW stuff, nothing to do with data processing. Your data model knows what it means by "finished", so it could arrange to let its controller know (e.g. using a notification of some sort) and the controller can hide the progress spinner. You probably want to keep the table out of it altogether.
If it really takes a long time to deliver the content of a row (e.g. the first time, thence is cached in some way for much quicker display) then you might want to consider showing a progress spinner in the row, starting off an asynchronous load/prep of the data then redisplay it when its ready, hiding the progress spinner. That's all up to you - NSTableVIew doesn't give you any help with any of that as it basically assumes that its datasource can deliver row content quickly enough not to need it. This sort of thing used to be fairly hard to achieve with cell-based tables, now much easier with view-based ones.
--Graham
_______________________________________________
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