• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Call of super from a custom NSCell in a custom NSControl
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Call of super from a custom NSCell in a custom NSControl
      • From: Joar Wingfors <email@hidden>
References: 
 >Call of super from a custom NSCell in a custom NSControl (From: Nicolas Dudebout <email@hidden>)

  • Prev by Date: core data key value path
  • Next by Date: Re: Newbie question: getting an object back from just a pointer
  • Previous by thread: Call of super from a custom NSCell in a custom NSControl
  • Next by thread: Re: Call of super from a custom NSCell in a custom NSControl
  • Index(es):
    • Date
    • Thread