Re: Call of super from a custom NSCell in a custom NSControl
Re: Call of super from a custom NSCell in a custom NSControl
- Subject: Re: Call of super from a custom NSCell in a custom NSControl
- From: Ricky Sharp <email@hidden>
- Date: Sat, 24 Feb 2007 09:27:06 -0600
On Feb 24, 2007, at 5:50 AM, Nicolas Dudebout wrote:
I'm trying to add a few features to level indicators and decided to
subclass NSLevelIndicator and NSLevelIndicatorCell to do so.
I instantiate my MyLevelIndicator programatically and call the test
method that is supposed to print super's description but it crashes.
This is a problem to me because I need to use super to draw my
custom cell.
I have made a minimal project to show this: http://
nicolasaujapon.free.fr/TestLevelIndicator.zip.
Problem is a logging issue. You are doing:
NSLog (@"Test: %@", super);
But super is a pointer. Do this instead to log the address:
NSLog (@"Test: %x", super);
Not sure why you're using super though. If you want the description
of your instance, just use:
NSLog (@"Test: %@", [self description]);
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden