• 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: NSOutlineView Not Updating After Adding Items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView Not Updating After Adding Items


  • Subject: Re: NSOutlineView Not Updating After Adding Items
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 6 Aug 2009 13:02:43 -0700

On Aug 6, 2009, at 12:19, Mark Szymczyk wrote:

I was calling the NSXML add methods. Thanks for pointing that out.

Well, I gave you the wrong answer. That may have been the correct way after all.


I tried creating the NSXML objects I want to add and adding them to the tree controller using the add:, addChild:, insert:, and insertChild: methods, and I get the same results. The methods canAdd:, canAddChild:, canInsert:, and canInsertChild: all return NO.

That was also the wrong answer. These methods don't add an object you create. For that, you need to use 'insertObject:atArrangedObjectIndexPath:'.


But NSXMLElement does claim KVO compliance for 'children', so your original approach should have been fine. And, if not, invoking 'rearrangeObjects' should have taken care of it.

The next step is probably to examine the NSTreeNode structure of the NSTreeController's arrangedObjects after you add an element, and decide whether the NSTreeController is missing the change, or if the NSOutlineView is missing the change.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >Re: NSOutlineView Not Updating After Adding Items (From: Mark Szymczyk <email@hidden>)

  • Prev by Date: Re: Change Opacity of Image
  • Next by Date: Re: Change Opacity of Image
  • Previous by thread: Re: NSOutlineView Not Updating After Adding Items
  • Next by thread: Mac OS X 10.5.8 update breaks tokenize function in -[NSXMLNode objectsForXQuery:error:]
  • Index(es):
    • Date
    • Thread