Mailing Lists: Apple Mailing Lists

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

Re: OutlineEdit example (outlineView:heightOfRowByItem:)




On May 2, 2005, at 3:32 PM, Keith Blount wrote:

This is driving me nuts now... There must be an easy

way to get the value of an object stored at a

particular row and column within an outline view that

uses NSTreeController and bindings, and I must be

missing the obvious...


I ran into something similar to this, but with a different delegate method.

It does seem that the "item" object is rather difficult to work with when the outline view is bound to a Tree Controller. I thought KVC messages would to do the proper thing, but the proxy doesn't seem to like that.

After trying a number of other things, I resorted to just calling -observedObject on the item to get to the thing it points at. This will generate a compiler warning because it's private API (so it could break at any time), but there just doesn't seem to be any other solution. That proxy object is like a brick.

Also, to save you some time in the future -- you might find that you have to implement dummy/empty data source methods to get drag and drop to work with NSTreeController.


   - Scott


--

http://treehouseideas.com/

http://theocacao.com/ [blog]



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >RE: OutlineEdit example (outlineView:heightOfRowByItem:) (From: Keith Blount <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.