Go Back   The macosxhints Forums > Working with OS X > OS X Developer



Reply
 
Thread Tools Rate Thread Display Modes
Old 01-02-2005, 06:01 AM   #1
almays
Prospect
 
Join Date: Jan 2005
Posts: 13
Question Connect button in IB

Hi.

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.
almays is offline   Reply With Quote
Old 01-02-2005, 08:30 AM   #2
hermasj
Triple-A Player
 
Join Date: Jun 2004
Posts: 77
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.

Steve
hermasj is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 09:04 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.