Re: Problems with custom NSView subclass, IBPalette, and bindings support
Re: Problems with custom NSView subclass, IBPalette, and bindings support
- Subject: Re: Problems with custom NSView subclass, IBPalette, and bindings support
- From: Scott Anguish <email@hidden>
- Date: Wed, 26 Jan 2005 15:33:59 -0500
On Jan 26, 2005, at 1:29 PM, mmalcolm crawford wrote:
On Jan 26, 2005, at 6:40 AM, Sean McBride wrote:
On 2005-01-25 14:12, mmalcolm crawford said:
Now in IB, I see all my items listed automatically in the bindings
part
of the 'Show Info' window (Cmd-4). I set one of them up, but as
soon
as I did the disclosure triangle closed up and the binding item is
now
greyed out. I've tried rebooting, rebuilding the palette, but I
just
can't get the thing to be enabled.
Anyone seen this before?
In your implementation of bind:... have you called super?
Doh! Adding that fixed it. Thanks a million mmalc!
Actually, thanks to someone else in engineering who told me, and to
Scott for rubbing it in...
Should I call super at the beginning or end of my implementation?
I don't think it matters.
well, it can. It depends on if you're changing the values that are
passed to super
Do I also need to call super for unbind? valueClassForBinding?
observeValueForKeyPath:...?
Probably, yes, I will check (unless Scott wants to chime in here?)...
yep... pretty much in general this is a rule... if you override
something, but still need the default behavior, you must call the
superclass.
the example in the doc shoes observeValueForKeyPath:... calling
super in fact.
Am I blind, or is this not documented? Your GraphicsView.m and
JoystickView.m classes in you GraphicsBindings example also do not
call
super. Is doing so only needed if one is making an IBPalette?
No, it's not documented. Please file an enhancement request.
as I said, calling super is probably the right thing to do unless
you're replacing functionality entirely.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden