Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: radio buttons



I am just using actions.

Now i get the whole picture :-)

Well, the least effort solution at this point is to just call the method manually at startup. (and study bindings in the near future!)

Thanks,

Kostas

On 17 Sep 2005, at 14:12, Uli Kusterer wrote:

Am 15.09.2005 um 00:14 schrieb Konstantinos Theofilis:

If he leaves the radio buttons as they are (A button already selected) and proceeds to the next screen, the variable is not changed.


You're not writing whether you're using bindings or just actions. Bindings should automatically sync up your instance variable with the matrix *if* you've set this up correctly. If it doesn't, it's a bug.


If you're using actions, the cause is that the action is only sent when the button changes. Target-action expects you to sync up the controls and your data storage yourself at startup. One way to do this would be to just manually call your action method at startup so your code runs once and picks up the state of the buttons.

Typically, it's not the radio buttons that hold state information (they only keep a copy cached for faster display), but a document or NSUserDefaults, which is why you need to write this code. AppKit can't know where the data comes from if you don't use bindings.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de





_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >radio buttons (From: Konstantinos Theofilis <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.