Re: Subclassing NSButton
Re: Subclassing NSButton
- Subject: Re: Subclassing NSButton
- From: Ricky Sharp <email@hidden>
- Date: Fri, 4 Nov 2005 16:18:14 -0600
On Nov 4, 2005, at 1:22 PM, Simon Brée wrote:
Hi everyone,
I'm trying to subclassing NSButton. For the moment, it is just a
test : my class SBButton has no specific methods.
In IB, I created a SBButton class ans assigned it to a NSButton.
But when I run my test program, I've got :
[Session started at 2005-11-04 20:13:10 +0100.]
2005-11-04 20:13:11.088 ShapedButton[2868] *** -[SBBouton
initWithCoder:]: selector not recognized [self = 0x306810]
2005-11-04 20:13:11.089 ShapedButton[2868] An uncaught exception
was raised
2005-11-04 20:13:11.113 ShapedButton[2868] *** -[SBBouton
initWithCoder:]: selector not recognized [self = 0x306810]
2005-11-04 20:13:11.113 ShapedButton[2868] *** Uncaught exception:
<NSInvalidArgumentException> *** -[SBBouton initWithCoder:]:
selector not recognized [self = 0x306810]
ShapedButton has exited due to signal 5 (SIGTRAP).
What did I done wrong ? What does it mean ?
How did you create an instance of your button? Did you use Interface
Builder and create a custom view? Or are you building the instance
programatically?
It looks like you're creating the button from a nib (and thus
initWithCoder is being called).
What exactly is the source to your subclass?
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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