Re: Binding NSTreeController to NSBrowser
Re: Binding NSTreeController to NSBrowser
- Subject: Re: Binding NSTreeController to NSBrowser
- From: Matt Neuburg <email@hidden>
- Date: Tue, 18 Dec 2007 13:03:42 -0800
- Thread-topic: Binding NSTreeController to NSBrowser
On or about 12/18/07 12:07 PM, thus spake "Chris Blackburn"
<email@hidden>:
> Hi,
>
> This is exactly the problem I have. I have spoken off list to an apple
> employee and they say they are hard at work on a fix so hopefully it
> will be here soon.
>
> In the mean time I'm working on a temporary interface class as a
> stopgap. I'll keep you informed as to my progress.
Cool, thanks. Meanwhile I've got a workaround - bind the NSBrowser to both
Content (arrangedObjects) and ContentValues
(arrangedObjects.representedObject) of the NSTreeController. My NSBrowser
just came to life!
I still don't have quite what I wanted - I would have liked not to have to
bind the NSTreeController to anything, but just to let it prepare content
internally. When I do the latter, the NSBrowser is populated but its cells
are blank. So I've had to bind the NSTreeController into my model. Still,
this is better than nothing. m.
> On 18 Dec 2007, at 19:38, Matt Neuburg <email@hidden> wrote:
>
>> On Mon, 17 Dec 2007 23:47:39 +0000, "Chris Blackburn"
>> <email@hidden> said:
>>> Hey all,
>>>
>>> Since there was no activity on this I've raised a bug, radar id
>>> 5649518. Any help on getting round this bug until there is a fix
>>> would
>>> be greatly apreciated.
>>>
>>> Thanks
>>>
>>> Chris
>>>
>>> On 12/14/07, Chris Blackburn <email@hidden> wrote:
>>>> Hey all,
>>>>
>>>> Part of my app takes an XML input file, hands it to an
>>>> NSTreecontroller which is bound to an NSBrowser. This works fine
>>>> under
>>>> tiger but is broken under leopard.
>>>>
>>>> I think I have traced the problem to where the NSBrowsers content is
>>>> bound to treeController.arrangedObjects. The arrangedObjects binding
>>>> seems to have changed under leopard, also from the docs I get the
>>>> impression I was never supposed to use that binding anyway.
>>
>> Could I steal this thread to ask a more elementary question? Chris, it
>> sounds like you can actually help with this so I hope you don't mind
>> my
>> piggybacking here.
>>
>> All I want to do is make a simple NSBrowser on Leopard (only) using
>> NSTreeController and NSTreeNode. My NSTreeController's content
>> object is
>> bound to an NSTreeNode which itself has a subnode I've given it; the
>> tree is
>> created using NSTreeNode treeNodeWithRepresentedObject (my
>> "represented
>> objects" are simply strings) and mutableChildNodes, as you would
>> expect, and
>> I can see that the tree is being created, and I can see that the
>> NSTreeController's content is indeed the tree. So things would
>> appear to be
>> working from that point of view.
>>
>> My problem is that the NSBrowser is not displaying anything when the
>> app
>> runs. It's bound to the NSTreeController's arrangedObjects.
>>
>> Can someone set me straight? This should be the simplest thing in
>> the world
>> to do, so presumably all I need is some kind of dope slap... Please
>> provide
>> it! Thx - m.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, http://tinyurl.com/2ouo3b
Take Control of Customizing Leopard, http://tinyurl.com/2t9629
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
_______________________________________________
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