Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cblackburn

macrumors regular
Original poster
Jul 5, 2005
158
0
London, UK
Hi all,

Under Tiger I had an application that tool the contents of an XML file and fed it into an NSTreeController which in turn was rendered by an NSBrowser. This same app does not work when it is compiled/run under Leopard.

I have traced the problem down to the NSBrowser as the Tree Controller has the correct data in it. I bind the content of the NSBrowser to treeController.arrangedObjects, this does not seem to present any data to the NSBrowser or the data is not understandable by it.

After some googling I managed to find this page containing some Cocoa release notes for Leopard:- http://developer.apple.com/releasenotes/Cocoa/AppKit.html#NSTreeController. In which there is the statement :-
In Tiger, NSTreeController's arrangedObjects method returned an opaque proxy that developers weren't supposed to use directly. In Leopard, the arrangedObjects method returns a proxy that responds to the NSTreeNode methods
. Ok, but according to this page arrangedObjects is the correct thing to bind to:- http://developer.apple.com/documentation/Cocoa/Conceptual/NSXML_Concepts/Articles/UsingTreeControllers.html.

So now I am thoroughly confused as to what I should bind to. Does anyone know what binding path to use so this can work for both Tiger and Leopard?

Thanks

Chris
 
Ok, I have now raised this as an official bug report with Apple, I would still appreciate any ideas on how to get a workaround before Apple get round to fixing this.

Thanks

Chris
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.