Re: Deselecting an NSButtonCell?
Re: Deselecting an NSButtonCell?
- Subject: Re: Deselecting an NSButtonCell?
- From: Nick Forge <email@hidden>
- Date: Tue, 3 Apr 2007 15:42:03 +1000
On 03/04/2007, at 2:48 PM, Andreas Mayer wrote:
Am 03.04.2007 um 04:51 Uhr schrieb Nick Forge:
I can easily enable the cells, change the setting, then re-disable
them, but that's a bit of an ugly workaround, and may result in
the user being able to see the radio buttons flicker if their
computer is slow enough (or busy enough).
I don't know why you think that'd be ugly. And from what I
understand about the display system, there won't be any flicker.
See:
http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaFundamentals/CoreAppArchitecture/chapter_7_section_5.html
especially:
"A view typically doesn't draw itself whenever it wishes. It must
be explicitly marked as invalid (or "dirty") and thus in need of
display. Redrawing of the view can then either take place
immediately or, if the NSWindow auto-display feature is turned on,
it can be deferred until the conclusion of the current cycle of the
main event loop. Windows have auto-display enabled by default."
So, unless you somehow force your view to re-display, it won't
happen until the next cycle of the main event loop. Now matter how
many changes you make to it in the meantime.
Ok, it sounds like that'll be fine to just enable, deselect, then
disable each one. Thanks for the tip.
Is there another way to get the cells to deselect while they are
disabled?
No idea.
This seems like a bug to me - unless there is a good reason that you
can select a disabled NSButtonCell, but not deselect a disabled
NSButtonCell. It seems like you would either disallow both actions,
or allow both. Can you think of a reason that it might act the way it
does?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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