Re: Wrong type of button in IB?
Re: Wrong type of button in IB?
- Subject: Re: Wrong type of button in IB?
- From: Andy Lee <email@hidden>
- Date: Thu, 16 Jun 2005 14:21:56 -0400
On Jun 16, 2005, at 2:05 PM, Mark Dawson wrote:
I've created a new IB nib, and hooked up an outley
("outletThatWorks")t; however, when I added a new outlet
(myButton), I can't connect to it (control drag from my controller
to an NSTableView object)--I get an error "myButton must be of type
NSButton") What does that mean, as "myButton" IS an NSButton type?
@interface myController : NSWindowController {
@private
IBOutlet NSButton* outletThatWorks; // checkbox
IBOutlet NSButton* myButton; // NSTableView
}
You've declared myButton to be an NSButton, so when you try to tell
IB to connect it to something that's *not* an NSButton, it naturally
complains. An NSTableView is not a kind of NSButton.
You need to declare the outlet appropriately for the type of object
you want it to connect to, and you should probably name it
appropriately while you're at it, something like this:
IBOutlet NSTableView* myTable; // NSTableView
--Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden