FROM : Georg Seifert
DATE : Mon Jun 23 22:21:48 2008
>> Does anybody got saving the item views working. I filed a but at
>> apple about
>> this but i was curios if anyone found a workaround.
>
> The answer to this question depends entirely on what you're trying
> to accomplish (and how you have things wired). Unless you have a very
> good reason, however, you're probably going about this the wrong way.
> That is, the views should be dictated by the objects they represent.
>
> If you store all the states (sort order, etc.) in the model objects
> you represent with the collection view and its items, all you need to
> do is restore those model objects (assuming they're wired up to your
> collection view) and they should be working just fine (and with no
> effort once everything's set up if you're using Core Data and
> Bindings).
>
> So ... why are you trying to save the views?
the NSColletionView is bound to an array of 300-2000 instances of
myClass. If I filter this array (setting a predicate on the
ArrayController) and than change back to see all Elements, the
CollectionView regenerates all the item views for the elements I did
not saw during filtering. This takes several second (on my Powerbook).
To save the viewItems for a later use would solve the speed issue.
Are there better approches speeding things up??
Thanks
Georg
DATE : Mon Jun 23 22:21:48 2008
>> Does anybody got saving the item views working. I filed a but at
>> apple about
>> this but i was curios if anyone found a workaround.
>
> The answer to this question depends entirely on what you're trying
> to accomplish (and how you have things wired). Unless you have a very
> good reason, however, you're probably going about this the wrong way.
> That is, the views should be dictated by the objects they represent.
>
> If you store all the states (sort order, etc.) in the model objects
> you represent with the collection view and its items, all you need to
> do is restore those model objects (assuming they're wired up to your
> collection view) and they should be working just fine (and with no
> effort once everything's set up if you're using Core Data and
> Bindings).
>
> So ... why are you trying to save the views?
the NSColletionView is bound to an array of 300-2000 instances of
myClass. If I filter this array (setting a predicate on the
ArrayController) and than change back to see all Elements, the
CollectionView regenerates all the item views for the elements I did
not saw during filtering. This takes several second (on my Powerbook).
To save the viewItems for a later use would solve the speed issue.
Are there better approches speeding things up??
Thanks
Georg
| Related mails | Author | Date |
|---|---|---|
| Georg Seifert | Jun 23, 22:05 | |
| I. Savant | Jun 23, 22:10 | |
| Georg Seifert | Jun 23, 22:21 |






Cocoa mail archive

