All right, so my original question still stands after all (and, I'm sorry, I should've done more poking around before posting here). target/action binding behaves differently from a connection: I can't implement validateMenuItem: (it's never called) and I don't see a way to send the control itself as an argument (to emulate the usual selector:(id)sender pattern).
What I want is to be able to preset actions (selectors), like the binding, but get behavior which includes validateMenuItem:. It's not the end of the world if it isn't possible, I'll just hook everything up at runtime with a big pile of [control setAction:@selector(...)]; [control setTarget:target]; in the controller's awakeFromNib. On Thu, Sep 24, 2009 at 5:53 PM, Sidney San Martín <s...@sidneysm.com> wrote: > I just found and looked at the BoundButton sample code, and see that I > missed the big, obvious "Selector Name" field in the inspector's > target binding section. I feel special. All's working now. > > On Thu, Sep 24, 2009 at 5:11 PM, Sidney San Martín <s...@sidneysm.com> wrote: >> I want to to set some controls' targets programmatically, but don't >> need to change their actions. Interface Builder shows a binding for >> "Target", which is perfect, but I can't find a way to set a control's >> action in IB *without* hooking up a target. >> >> What's the right way to do this? I could create an object with stub >> methods, or even put them on an existing object (like the file's >> owner, the one to which I'm binding the controls' targets), but those >> are ugly solutions. >> > _______________________________________________ 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