small medium large xlarge

Generic-user-small
05 Jul 2011, 17:59
Shawn Hickman (5 posts)

I added the IBOutlet to NotifyingClass.h but when I go back to MainMenu.xib and right-click the NotifyingClass object I can’t connect it to the new textField that I created (Figure 6.3).

I had this same problem in chapter 4 with connecting to the textView. I fixed it by clicking the right-facing arrow at the bottom of Interface Builder under the objects. I was able to connect that way. It’s not working this time though.

Generic-user-small
05 Jul 2011, 17:45
Shawn Hickman (5 posts)

I should also note that I am using Xcode 4.

Generic-user-small
05 Jul 2011, 18:21
Tim Isted (105 posts)

Does the HUD window not appear when you right-click? Or does it not show the outlet? Or is the issue that the outlet appears but can’t connect to the text field?

A reader has contacted me recently about an issue with the separate Interface Builder app under Xcode 3 where IBOutlet/IBAction changes to the @interface were never recognized, but I’ve not yet seen this kind of problem in the integrated IB under Xcode 4.

Generic-user-small
05 Jul 2011, 18:24
Shawn Hickman (5 posts)

The HUD appears and it shows the outlet, it just won’t connect.

Generic-user-small
05 Jul 2011, 18:41
Tim Isted (105 posts)

If you use the right-facing arrow you mentioned earlier, then expand everything in the IB object list, is the object definitely shown as a text field:

?

And is the outlet type in the @interface definitely an NSTextField and not an NSTextView etc?

Generic-user-small
05 Jul 2011, 18:45
Shawn Hickman (5 posts)

I feel silly. I had the @interface as NSTextView not NSTextField. Fixed and it works.

THANK YOU SO MUCH!!!!!!!!

Generic-user-small
05 Jul 2011, 18:50
Tim Isted (105 posts)

No problem - and I’m really glad it was that and not some impossible-to-fix Xcode bug.

This happens to me all the time, usually because I’ve been over-hasty pressing tab to accept an autocomplete prediction. What Xcode 4 really needs is a “read my mind” option…

You must be logged in to comment