-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/19/10 12:11 PM, Quincey Morris wrote:
> On Oct 18, 2010, at 23:02, Chris Share wrote:
> 
>> I'm using an NSMutable array as my data source for the table. The
>> problem I'm having is in clearing the array for each new folder.
> 
> You have a conceptual problem here. "Data source" means something
> specific in Cocoa -- an object that implements the
> NSTableViewDataSource protocol. If you're using a data source, then
> the object *isn't* an array (though of course a data source may use
> an array for its backing store, but that doesn't look like what
> you're doing here).

Maybe I overinterpreted the original post, but I was assuming that
inputArray was an instance variable of whatever class the OP's code was
extracted from, and that said class does in fact implement
NSTableViewDataSource.  Is there something in the code that was posted
that suggests otherwise?  (Chris, can you clarify this?)

(My assumption was based on the assertion that the table does sometimes
display data, whereas I think everything would just fall apart if a
simple array was used as the data source, no?)

> and then you shouldn't need to call 'reloadData' at all.

Yes for KVO, but if the architecture is as described above, calling
reloadData would seem to be correct.

I just want to make sure that I'm not missing something that the more
experienced contributors are seeing, as well as making sure that we
don't confuse the OP if they are in fact doing things correctly.

- -- 
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFMvfMYaOlrz5+0JdURAuyLAJ9/wupJhXdovZFN6ESZeYZyRMVtBwCeP8eu
9qOLqPwC8q3db1cJ8+SVMs0=
=lJ9h
-----END PGP SIGNATURE-----
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to