PDA

View Full Version : Small problem with NSTableView




Macaddicttt
Jan 24, 2008, 03:21 PM
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:

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
Jan 24, 2008, 04:23 PM
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
Jan 24, 2008, 04:35 PM
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... :o

HiRez
Jan 24, 2008, 05:28 PM
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.:oYes, 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
Jan 24, 2008, 09:38 PM
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:

HiRez
Jan 25, 2008, 11:20 AM
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
May 29, 2009, 08:21 AM
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: