• 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
How to get NSTreeController's added object or child
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to get NSTreeController's added object or child


  • Subject: How to get NSTreeController's added object or child
  • From: Robert Fischer <email@hidden>
  • Date: Sat, 6 May 2006 18:51:13 +0200

Is there a reliable method to get the newly created objects (with add: or addChild:) from a NSTreeController?

I am managing a NSBrowser by a cocoa-binded NSTreeController.
My challenge is to get an added object and set some initial value, depending on the previous selection.


I've already tried everything which came to my mind:
- observed selection to manipulate the new selected object
---> this seems to be delayed
- subclassing NSTreeController with newObject
---> works great with add: but is never called with addChild: !?!?
- subclassing NSTreeController with prepareContent
---> got never called this
- played around with "automaticallyPrepareContent"

Why, oh why, is there no delegate method "treeController:addedObject:". This question came up in November already.

BTW: CoreData is no option for me this time.


Thanks a lot,

Robert

--
     ---      -  .-.     --         --
         ---    /   \     ----                         tin:b Software
   .-.         /     \  ---  .-.        __o      .-.        (i)
  /   \       /       \     /   \     _`\<,_    /   \  Robert Fischer
 /     \     /         \   /     \   (*)/ (*)  /     `---------------
/       `---'           `-'       `-----------'


_______________________________________________ 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
  • Follow-Ups:
    • Re: How to get NSTreeController's added object or child
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: Do I "own" objects returned to me by reference?
  • Next by Date: Re: How to get NSTreeController's added object or child
  • Previous by thread: Re: Bizarre CoreData Problem
  • Next by thread: Re: How to get NSTreeController's added object or child
  • Index(es):
    • Date
    • Thread