Le 28 janv. 2010 à 19:57, Jens Alfke a écrit : > > On Jan 28, 2010, at 9:52 AM, Jonathan Chacón wrote: > >> thanks for your help but I don't know where I have to define de connection >> between outleets and actions. I have to type them in the appController, >> windowDelegate or where the outlets were defined? >> >> I have to type the connection in a function/method of a class or like a >> variable or outleet in the declaration area of a class? > > I'm not sure I understand the question. You already know when you want to set > a connection in code, right? You're writing out your logic and come to "ok, > now I need to connect button b to my bPressed: method." So put the calls > there.
Binding action is easy (call setTarget: setAction: on your Outlet in awakeFromNib), but how do you connect your outlet to your controller (so it is initialized at nib load time) ? I don't know any way to do it but in Interface Builder and unfortunately I don't see how to bind the outlet without mouse (but maybe someone has an idea). -- Jean-Daniel _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com