Re: Instantly setting preferences
Re: Instantly setting preferences
- Subject: Re: Instantly setting preferences
- From: Nick <email@hidden>
- Date: Sat, 01 Mar 2003 13:20:51 -0500
Connecting the checkbox buttons in IB must work. If it doesn't then you
must be doing something programmatically that disables the action. If
you are not setting the action programmatically, make sure you have set
the target properly too.
Basically you most likely want to have all the buttons send actions to
the same object/target (let's call it (setPref:) ). The method
(setPref:) resolves who is the sender of the action and what is the
state of the sender. The target can probably keep a NSMutableDictionary
to hold the preferences and can accept "queries" from other objects
about the application's preferences.
In order to make certain that your preferences changes happen
on-the-fly, the method (setPref:) must send messages to all affected
objects that they need to refresh their properties.
Of course, you can have the reverse design, where (setPref:) manually
sets the properties/preferences of the affected objects. I prefer the
first one, because it is scalable. I would go with several
NSNotification(s) and and a NSNotificationCenter to implement the
communication.
I hope some of this brainstorming helps, and that it was on target.
Nick
On Saturday, March 1, 2003, at 12:59 PM, Jesus De Meyer wrote:
>
I've seen several app where you can set the preferences the instant
>
you click on a button or select a popup menu. How is this trick done?
>
I have a preferences dialog with mainly checkboxes so I set each
>
checkbox to have its own action, however it seems this doesn't work,
>
it does work for my button.
>
>
So how do I do this?
>
>
Thanks,
>
>
Jesus
>
_______________________________________________
>
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.
_______________________________________________
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.