Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > delegates instead of notifications?

delegates instead of notifications?
Thread Tools
Professional Poster
Join Date: Apr 2001
Location: Long Beach, CA
Status: Offline
Reply With Quote
Sep 5, 2002, 12:04 AM
 
The NSPopUpButton sends out a notification when the user clicks on it so that the application can update the menu at that point. Is there a way to simply do this as a delegate, or do I have to register to receive the notification? I've noticed that most NSControl objects work fine as a delegate instead of requiring the notification. I'm doing something simple. I don't need to get that complex.

ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
Forum Regular
Join Date: Aug 2000
Location: UK
Status: Offline
Reply With Quote
Sep 6, 2002, 04:35 AM
 
Originally posted by Detrius:
The NSPopUpButton sends out a notification when the user clicks on it so that the application can update the menu at that point. Is there a way to simply do this as a delegate, or do I have to register to receive the notification? I've noticed that most NSControl objects work fine as a delegate instead of requiring the notification. I'm doing something simple. I don't need to get that complex.
That's odd. Usually if there is a notification available like this then there is a delegate method that you can override too (as delegates are registereed to receive all notifications by default). The header files don't have one, though.

Looks like you'll have to bite the bullet & register for notifications (it's only 1 line anyway, even if it is more work than setDelegate).
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:44 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2