popup buttons and notifications
popup buttons and notifications
- Subject: popup buttons and notifications
- From: Koen van der Drift <email@hidden>
- Date: Tue, 25 Mar 2003 09:05:09 -0500
Hi,
My app is more or less based on the MVC paradigm, so I have separate
classes for the view, the controller, and the model (duh ;). In the
main winodw I have several popup menu's that the user can use to
change settings in the model. Now the question is, how to go from the
popup menu setting to the model (an NSArray of objects).
I see a few options:
1. the controller has an IBAction method connected to the popup menu,
every change in the menu is then passed on to the model, and then
subsequently to each object in the NSArray
2. the model is notified when the popup menu changes, and then passes
the new value to each object in the NSArray
3. each object in the NSArray is notified directly when the popup menu changes
4. ....
Are there any pros and cons for each of the approaches? If I use #2
or #3 what is the notification I should 'listen to'? I only could
find NSPopUpButtonWillPopUpNotification, but that doesn't give me the
new value of the menu.
thanks,
- Koen.
_______________________________________________
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.