Re: NSMatrix, changing selection of Radio Button
Re: NSMatrix, changing selection of Radio Button
- Subject: Re: NSMatrix, changing selection of Radio Button
- From: email@hidden
- Date: Mon, 18 Mar 2002 20:53:55 -0800
but in the action which is called by the matrix itself, althoug I can
detect if it was just set to On or Off, but if I intercept a click on
the On button, and set it to off by calling selectCellWithTag:0 the
button stays in the On position. I cannot figure out why.
Try doing it with a delayed perform (see -[NSObject
performSelector:withObject:afterDelay:]) and see if that helps. AppKit
has a problem in many cases with the values of controls being changed
from within their own action methods, unfortunately. This may be such a
case.
Is there a better way to have the On position conditional to a certain
rule? I want to be able to turn it on when some items are selected in a
list. If none are selected, I do not want someone to turn it on.
Perhaps I can simple deactivate the matrix when nothing is selected,
that would probably solve the issue, but I'd like to understand what is
going on...
Dimming the radio control would be the typical way to do what you're
doing, I think. Changing the values of enabled controls "for" the user
is generally frowned upon, particularly if they user just set the value
of that control themselves and you're undermining their efforts by
setting it back. :->
Ben Haller
Stick Software
_______________________________________________
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.