• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
InterfaceBuilder - send action to self?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

InterfaceBuilder - send action to self?


  • Subject: InterfaceBuilder - send action to self?
  • From: Jonathan Taylor <email@hidden>
  • Date: Wed, 02 Mar 2011 09:57:51 +0000

It seems that InterfaceBuilder won't let me wire up my custom control to send an action to itself. This suggests to me that I am going the wrong way about what I am trying to do, or missing something really obvious. Can anybody advise?

My window has a number of text fields. One represents the current position of an attached translation stage, and other represent limits on its motion. I have a "set" button next to the limit fields which cause them to set their value to the current position of the stage. I think the tidiest way of coding this is to have a custom button class with outlets connecting it to the source and destination text fields, which when clicked executes something like:
	[dest takeIntValueFrom:src];

I don't think I can do this purely within IB, without a custom class, since I want the target control to take its value from a third control, not from the sender [the button]. However, ridiculous as it seems, I can't actually work out the right way of executing an action defined in the button itself when it is clicked. IB won't let me wire up an action to itself(*).

How can I go about executing an action defined in the button class itself? (Or why am I going about this the wrong way?).

Thanks for any suggestions
Jonny


(*) actually, I swear I did manage to wire this up once, but I can't get it to happen again. Now when I try to do it, I can drag from Sent Actions/selector to any other object, but not to the sending button.

_______________________________________________

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

  • Follow-Ups:
    • Re: InterfaceBuilder - send action to self?
      • From: Wayne Packard <email@hidden>
  • Prev by Date: Outlets Not Connected In awakeFromNib
  • Next by Date: Re: InterfaceBuilder - send action to self?
  • Previous by thread: Re: Outlets Not Connected In awakeFromNib
  • Next by thread: Re: InterfaceBuilder - send action to self?
  • Index(es):
    • Date
    • Thread