Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Macaddicttt

macrumors 6502a
Original poster
Apr 22, 2004
993
3
San Diego, CA
I searched for this, but I didn't find anything, so please excuse me if this has been answered before.

I'm working my way through Hillegass's Cocoa Programming for OS X, and I've run into a little snafu. In a custom class, I've created an IBOutlet of type NSTableView:

Code:
IBOutlet NSTableView *tableView;

but when I try and connect it to an NSTableView in Interface Builder, it says I can't because "tableView must be of type NSTableView, which makes no sense because it most definitely is. I've double-checked my typing a million times, and I know I didn't mess that up. I've just been copying right out of the book, yet I can't get rid of this problem.

Any help would be very much appreciated. The best I can figure is that something in OS X has changed between when the book was written and 10.4, which is what I'm running now.
 

antibact1

macrumors 6502
Jun 1, 2006
334
0
I would check you are actually hitting the NSTableView when making the connection. An NSTableView has many other views inside it that you may be hitting, such as NSTableColumn
 

Macaddicttt

macrumors 6502a
Original poster
Apr 22, 2004
993
3
San Diego, CA
I would check you are actually hitting the NSTableView when making the connection. An NSTableView has many other views inside it that you may be hitting, such as NSTableColumn

That was it! Thanks a lot. It's quite ridiculous how difficult it is to hit NSTableView. NSTableColumn takes up most of it, the title and scroll bar is NSScrollView, but the very, very edge of the whole thing is NSTableView.

Although I still feel like an idiot for not catching that... :eek:
 

HiRez

macrumors 603
Jan 6, 2004
6,250
2,576
Western US
That was it! Thanks a lot. It's quite ridiculous how difficult it is to hit NSTableView. NSTableColumn takes up most of it, the title and scroll bar is NSScrollView, but the very, very edge of the whole thing is NSTableView.:eek:
Yes, one of my biggest complaints about Interface Builder. Is it any better in the Leopard version than in Tiger? They should have a hierarchical outline view like they do under the Classes tab, but only for objects that are in the current document. Then you could just click on "My Table View" (or whatever) directly to select it no matter how deeply it was buried, or more easily multi-select objects.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
Yes, one of my biggest complaints about Interface Builder. Is it any better in the Leopard version than in Tiger? They should have a hierarchical outline view like they do under the Classes tab, but only for objects that are in the current document. Then you could just click on "My Table View" (or whatever) directly to select it no matter how deeply it was buried, or more easily multi-select objects.

It is slightly easier to work with, but they do have a hierarchical view:
 

Attachments

  • Picture 1.png
    Picture 1.png
    61 KB · Views: 68

HiRez

macrumors 603
Jan 6, 2004
6,250
2,576
Western US
It is slightly easier to work with, but they do have a hierarchical view:
Oh man, nice! I've been holding off on upgrading to Leopard because my work won't upgrade yet (big company beauracracy + IT security paranoia), but the new dev tools and Time Machine are making it hard to wait. Thanks for the pic.
 

lbl52001

macrumors newbie
May 29, 2009
1
0
Oh man, nice! I've been holding off on upgrading to Leopard because my work won't upgrade yet (big company beauracracy + IT security paranoia), but the new dev tools and Time Machine are making it hard to wait. Thanks for the pic.

In Xcode old version you can navigate the hierarchical tree like this:
 

Attachments

  • Picture 2.png
    Picture 2.png
    32.6 KB · Views: 78
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.