detecting a control's value changing, bindings, null placeholder
detecting a control's value changing, bindings, null placeholder
- Subject: detecting a control's value changing, bindings, null placeholder
- From: "Sean McBride" <email@hidden>
- Date: Sun, 3 Oct 2004 15:55:47 -0400
Hi,
What method can my custom control override to know that its value is to
change?
I am creating an NSTextField subclass and it does its own cursor rect
handling. Every time the control's value changes I need to recompute the
cursor rect (based on string width). I do this in by overriding
setObjectValue to call super then fix the cursor rects.
This works well, except when I use bindings and the null placeholder.
Say the control is given the value "Hello", its cursor rect is then
calculated correctly, but then the user does something, and my control is
then supposed to show a NULL value, but setObjectValue is never called in
this case, the NullPlaceholder thing seems to do something magic instead. :)
How can my control deal with this?
Thanks!
_______________________________________________
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