Re: subclassing NSButton not working
Re: subclassing NSButton not working
- Subject: Re: subclassing NSButton not working
- From: Jeffrey Drake <email@hidden>
- Date: Wed, 8 Jan 2003 10:33:42 -0500
On Wednesday, Jan 8, 2003, at 06:18 Canada/Eastern, Stiphane Sudre
wrote:
>
>
On mercredi, janvier 8, 2003, at 07:05 AM, Jeffrey Drake wrote:
>
>
> After seeing Safari's Favorites toolbar, I wanted to make my own
>
> version of its type of button. I didn't see anything else I could use
>
> for it.
>
>
>
> Documentation and examples for subclassing NSButton and ...Cell seems
>
> nonexistent.
>
>
>
> Source code: http://homepage.mac.com/jeffreydrake under public folder
>
> it is 'interfacedevelopment.tgz'.
>
>
>
> I have put break points in every function, only the awakeFromNib even
>
> entered.
>
>
>
> In interface builder I am using an NSButton with a custom class of
>
> JDRolloverButton.
>
>
>
> Any help at all is really appreciated, i even tried in #gnustep on opn
>
> and one of the guys there said it should have worked.
>
>
Add a trackingRect maybe... and override mouseEntered/mouseExited.
>
>
>
I have tried to put the mouseEntered and mouseExited, and didn't think
anything would change and it didn't. I might not have mentioned that
the appearance that I am trying to draw does not work either.
I have just checked something:
(gdb) po [oButton cell]
<NSButtonCell: 0x2525f0>
So it isn't using my cell class, even though I told it to:
+ (Class) cellClass
{
return [JDRolloverButtonCell class];
}
This is a confusing thing.
Regards,
Jeffrey Drake
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.