• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: mmalc's FilteringArrayController and NSTreeController issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: mmalc's FilteringArrayController and NSTreeController issues


  • Subject: RE: mmalc's FilteringArrayController and NSTreeController issues
  • From: Keith Blount <email@hidden>
  • Date: Mon, 20 Jun 2005 14:16:04 -0700 (PDT)

Sorry, I made a mistake in my earlier post -
NSTreeController's -content method *does* return a
legitimate array. However, this array is of the bound
objects, *not* of _NSControllerTreeProxy items, so it
still doesn't providing a way of converting back to a
required item in
-outlineView:itemForPersistentObject:.

I've still made no progress on figuring a way to
filter NSTreeController either - I cannot find any
reference on how to do this anywhere.

Any advice much appreciated.
Thanks,
Keith

FROM : Keith Blount
DATE : Mon Jun 20 19:01:58 2005

Sorry to reply to my own question and to have gone on
about NSTreeController so much recently, but I feel
like I'm headbutting a wall at the moment. Does no one
have any idea of how to do this (see post pasted at
bottom)?

I am starting to see the beauty of NSTreeController,
but the difficulty of subclassing it to display only
certain objects is defeating me.

I am also having another, sort-of-related problem:
does anybody know how to iterate through an
NSTreeController to get its objects? Using its
-contents or -arrangedObjects methods doesn't seem to
work (they don't even seem to return proper arrays).
In particular, I am still trying to implement
NSOutlineView's datasource
-outlineView:persistentObjectForItem: and
-outlineView:itemForPersistentObject: methods. The
problem with these methods, as has been discussed here
elsewhere, is that the item passed in is a private
_NSTreeControllerProxy object (or some such). I can
use the private API method -observedObject to get the
represented object for
-outlineView:persistentObjectForItem:, but
transferring this back to an _NSTreeControllerProxy
(or whatever it is called) for
-outlineView:itemForPersistentObject: object seems
impossible.

Many thanks in advance,
Keith


FROM : Keith Blount
DATE : Sun Jun 19 12:40:00 2005

Hello,

I am trying to work out how to get an NSTreeController
to display only certain objects. As far as I can see,
mmalc's FilteringArrayController at
http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
does exactly what I want to do except that
FilteringArrayController is a subclass of
NSArrayController and I would need to subclass
NSTreeController.

However, FilteringArrayController overrides
NSArrayController's -arrangeObjects: method - and
NSTreeController has no such method to override.

Does anybody know how to do something similar for
NSTreeController? The docs mention overriding
insertObject:atArrangedObjectIndexPath: but it says
this for NSArrayController too.

Many thanks for any hints,
Keith



__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: RE: mmalc's FilteringArrayController and NSTreeController issues
  • Next by Date: Re: objectInXXXAtIndex: exception
  • Previous by thread: RE: mmalc's FilteringArrayController and NSTreeController issues
  • Next by thread: Saving with Core Data
  • Index(es):
    • Date
    • Thread