Re: Sharing models between buttons
Re: Sharing models between buttons
- Subject: Re: Sharing models between buttons
- From: Scott Anguish <email@hidden>
- Date: Mon, 18 Aug 2003 23:35:45 -0400
You could make a subclass of NSButton for your button and have the
subclass make each instance register to receive a specific notification
(which you'd send when you wanted to change the overall state). Have
the subclass do whatever it needs to upon receiving the notification.
On Monday, August 18, 2003, at 5:50 PM, Eric Scharff wrote:
My application has a number of boolean flags that can be set in
various ways and from various sources (menu items, check boxes,
simulations, network events, hopefully apple events).
I would like to have a mechanism where I only have one boolean
object, and when it changes any and all views that depend on
that object change at once.
What is the best way to do this with existing AppKit
functionality? For example, is there a way to get a NSMenuItem
and NSCheckbox to share the same state?
The data source model is great for complex components, but what
do you do with simple components like check boxes and radio
buttons? I'd rather not write custom controllers for every
single action...
-Eric
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
_______________________________________________
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.