Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Looking for a non-Core Data tree solution in Cocoa... is there one?



Hi,

I'm writing because I'm trying to use a tree (more specifically an NSTreeController because it's the only tree class provided by Apple) for the task of holding categories for an Amazon.com "browse" items search (through their web service), but I'm really not finding it up to the task: The methods provided just don't seem up to par with their Java counterparts, which are what I've used before when I've programatically manipulated trees. I assume (and please, please correct me if I'm wrong) that this is because NSTreeController is designed more with bindings in mind than with programmatic manipulation in mind, but right now I'm trying to use it mainly as an internal data structure that the user will probably never see, and it's presenting me with all kinds of obstacles: Seemingly-basic tasks having to do with adding a child to an object in the tree are turning into marathons because since NSTreeController doesn't have a containsObject method, nor a method to find out the indexPath for an object, I'm having to keep a whole separate NSMutableArray just of index paths, and iterate through that array every time I want to add something to the tree -- it's ridiculous. I guess I could use Core Data, but it seems like a lot just for something that would really only have two attributes -- and strings, at that. Does anything know of a better way to do this; a third-party library; anything? I mean, the methods just aren't there...

Thanks,
Sam


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.