Re: Sharing models between buttons
Re: Sharing models between buttons
- Subject: Re: Sharing models between buttons
- From: Óscar Morales Vivó <email@hidden>
- Date: Tue, 19 Aug 2003 13:11:11 +0200
You usually just connect all of them as outlets to the same controller,
and switch all of them on or off at the target function.
I know it's lame-o glue code, but it's something that can be done in a
few lines of easy to write code.
That, or waiting for Panther (*wink* *wink* *nudge* *nudge*). I suggest
for enlightment
http://0x2a.no-ip.org/mt/archives/000008.html (which,
BTW, is #9 Google search result when searching 'Model View Controller'.
Go Dempsey!).
On Monday, 18 August 2003, at 23: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.
/*
Oscar Morales Vivs
Eternal Computer Science Student. Master of C++ Templates. Cocoa Nut.
Computer Graphics Scientiam Lumina. UI Guru in Training. Dabbler in all
things CS and most which are not.
Web stuff:
http://homepage.mac.com/oscarmv/index.html
*/
_______________________________________________
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.