|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Hi, I have a question regarding UI item validation in a document-based app. This is my current design: A separate nib for the main menu, and a separate nib for the windowcontrollers to be instantiated from my document objects using makeWindowControllers. For some of the menu items, I would like to use the target-action mechanism, and I would like to implement the action methods in my windowcontroller class. My question is, in the MainMenu.xib file, what would be the preferred way to link the menu items to their target object? I have tried setting my windowcontroller class as File's Owner in the mainmenu nib; but that didn't work, as the (first) windowcontroller object is only initialized *after* the menu is instantiated, resulting in "could not link target.." error message on startup. Adding a windowcontroller to the mainmenu nib also doesn't work, as the windowcontrollers should be instantiated from my document objects. right? So, that leaves me the option to use the First Responder object. This does work, but I'm still wondering if maybe there is a better approach. Thanks, -- Luc Van Bogaert _______________________________________________ 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
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.