Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Getting an error connecting to target. Should be simple. Help please.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="ukchucktown" data-source="post: 1204082" data-attributes="member: 129039"><p>Don't copy my code, it won't work for you. Your view is different with different controls and variable names. It was meant as an example of how to hook callbacks in your controller to the actual controls generating the events. It's kind of difficult to explain how it works in Interface Builder. I use xcode 4 and the steps I outline are for version 4. The process is similar in xcode 3.</p><p></p><p>You need to define your controller interface with the appropriate IBOutlet and IBAction tags. They are just markers, technically they don't do anything beyond tagging variables and methods for Interface Builder.</p><p></p><p>Once that's done, drag a control onto the view object in Interface Builder then open the File's Owner and click the little Arrow icon in the Utilities window. Under Outlets you should see all your outlets defined in your controller class. Click and hold the little circle next to the outlet you want to wire to the control. Drag the blue line on top of the control to hook the control to the instance variable (outlet) in your controller. It's a similar process for the actions. Press and hold the control button on your keyboard and click the control in the view. Drag the blue line to the File's Owner and select the action from the popup menu. Basically you are wiring outlets and actions in the controller class to the control in the view.</p></blockquote><p></p>
[QUOTE="ukchucktown, post: 1204082, member: 129039"] Don't copy my code, it won't work for you. Your view is different with different controls and variable names. It was meant as an example of how to hook callbacks in your controller to the actual controls generating the events. It's kind of difficult to explain how it works in Interface Builder. I use xcode 4 and the steps I outline are for version 4. The process is similar in xcode 3. You need to define your controller interface with the appropriate IBOutlet and IBAction tags. They are just markers, technically they don't do anything beyond tagging variables and methods for Interface Builder. Once that's done, drag a control onto the view object in Interface Builder then open the File's Owner and click the little Arrow icon in the Utilities window. Under Outlets you should see all your outlets defined in your controller class. Click and hold the little circle next to the outlet you want to wire to the control. Drag the blue line on top of the control to hook the control to the instance variable (outlet) in your controller. It's a similar process for the actions. Press and hold the control button on your keyboard and click the control in the view. Drag the blue line to the File's Owner and select the action from the popup menu. Basically you are wiring outlets and actions in the controller class to the control in the view. [/QUOTE]
Verification
Name this item. 🍎
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Getting an error connecting to target. Should be simple. Help please.
Top