Re: problem with custom nsview as first responder
Re: problem with custom nsview as first responder
- Subject: Re: problem with custom nsview as first responder
- From: "roberto toro" <email@hidden>
- Date: Thu, 26 Jul 2007 07:51:59 +0100
Thanks Paolo,
I didn't know how to add actions to a custom NSView in IB (if I try,
IB says "Not Applicable"). But when you told me it was possible I
kept investigating, and finally I dragged&dropped MyView.h to
MyDocument.nib in IB and it imported all the actions. Now it works
perfectly.
cheers!
roberto
I added two actions to the FirstResponder – action1,
action2 – and I linked them to item1, item2 in the NSPopUpButton.
Then the actions will go to the First Responder -- and that changes
all the time (and rightly so)!
See:
http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/>EventArchitecture/chapter_2_section_5.html
http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/>EventHandlingBasics/chapter_4_section_6.html
If the actions are related to the custom view, than link them to the
view itself in IB. If the application is non-trivial, and depending on
the action itself, it's also possible that the actual destination
could be better positioned in the custom view's controller.
HTH
Paolo
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden