Re: Odd binding issue
Re: Odd binding issue
- Subject: Re: Odd binding issue
- From: "Timothy Reaves" <email@hidden>
- Date: Fri, 12 Mar 2004 10:16:51 -0500 (EST)
>
On 12. Mar 2004, at 4:54, T Reaves wrote:
>
>
> What is happening, however, is that the first time that particular
>
> widget is displayed, the object is displayed in the text view, not the
>
> objects description. Here is what gets displayed: <Item: 0x358970>.
>
>
>
> When the next object is selected - and therefore displayed - it is
>
> displayed correctly. I can also then go back to the first object and
>
> it displays correctly. It does not matter which object in the array
>
> is displayed first, always the first one - and only the first one - is
>
> displayed incorrectly.
>
>
The problem is that when an object is observed, the class pointer (isa)
>
of that object is swapped -- the new class will have all the old
>
methods, but unfortunately a new implementation for description, which
>
takes precedence over the old one, effectively rendering the
>
description method useless.
>
>
When you get different results it is because the text view will
>
initially have to query the observed object for the description, but
>
can thereafter rely on the value sent in the 'change' dictionary, which
>
could be correct if e.g. the description is changed using
>
will/didChangeValue:forKey: -- not sure how you actually do change
>
items?!?
>
>
The object that is bound is always of the same type. The objects are
being changed as different ones are selected in a table view bound to
an NSArrayController.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.