Re: Strange observer problem
Re: Strange observer problem
- Subject: Re: Strange observer problem
- From: Kyle Sluder <email@hidden>
- Date: Sat, 01 Dec 2012 08:29:04 -0800
Sounds like NSButton is not KVO-compliant for `state`.
--Kyle Sluder
On Dec 1, 2012, at 7:55 AM, Gordon Apple <email@hidden> wrote:
> Seemingly simple problem. View in a panel window has a push-on/push-off
> button. View has link to button (so I don¹t have to find it by tag). View
> observes button state. Observer sets a color property according to button
> state and calls [self setNeedsDisplay:YES]. Draw method fills view with
> color. Problem: Goes through the motions, but doesn¹t work.
>
> Button is bound to property elsewhere. Another view has same button
> function bound to same property. Clicking second button visible changes
> first button state and containing view changes color appropriately. Why
> doesn¹t clicking first button work? I¹ve even tried a delayed invocation on
> setNeedsDisplay. What¹s going on here that¹s defeating the redraw when its
> own button is pushed?
>
> (Panel is non-activating, hide on deactivate, which makes tracing in xcode
> debugging difficult. Have to do it with NSLogs.)
>
>
>
> _______________________________________________
>
> 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
_______________________________________________
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