Re: Subclassing NSButton
Re: Subclassing NSButton
- Subject: Re: Subclassing NSButton
- From: Conor Dearden <email@hidden>
- Date: Sat, 05 Nov 2005 17:34:43 +0100
In your discussion of what does and does not get called nobody answered the
man's original question. It is likely that you are actually not sub-classing
NSButton but NSObject by mistake. To check look at the header SBButton.h in
Xcode. It should look like this:
#import <Cocoa/Cocoa.h>
@interface SBButton : NSButton
{
}
Make sure it says NSButton and not anything else. The only problem with my
theory is IB should not have let you change the class of NSButton to
SBButton unless it was an actual subclass of NSButton. As Rick mentioned it
is a good idea to show the relevant source code when asking for help on the
list, especially in a case like this where the code is so little. As a side
not to the related discussion that started from this question, NSButton
conforms to NSCoding as it is a subclass of NSResponder that conforms to
NSCoding hence it responds to initWithCoder:
Conor Dearden
http://www.bruji.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