View Full Version : Connect button in IB
01-02-2005, 06:01 AM
I am making my first project. Looking at the CurrencyConverter I try to make some similar stuff.
In IB the button "Connect" in the connections window is greyed out and unavailable all through. So I cannot set up any outlets.
01-02-2005, 08:30 AM
Outlets and actions were a little confusing to me at first too.
If you're trying to connect a button to a controller object _first_ you need to set up an _action_ method in the _controller_ object. Then <control>drag from the button to the controller, select the action method, then click connect. This will trigger the action method in your controller to be called when the button is clicked.
On the other hand if you're trying to connect your controller object to your button, then you first need to set up an _outlet_ in your controller. Then <control>drag from the controller to the button, select the _outlet_ and click connect. This gives your controller object a pointer to your button so the controller can send messages to the button.
In either case the outlets and actions need to be set up first, before you attempt to make the connection.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.