• 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: Abstract class with single subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Abstract class with single subclass


  • Subject: Re: Abstract class with single subclass
  • From: Seth Willits <email@hidden>
  • Date: Wed, 27 May 2009 13:44:55 -0700

On May 27, 2009, at 7:51 AM, Michael Ash wrote:

if ([[self class] isEqualTo:[BaseClass class]])

Oops, I forgot to mention one other thing. This works but is excessively wordy and strange. In a class method, [self class] is equivalent to self.

Actually, I accidently used [self class] in a class method two weeks ago, and it was causing a crash. I forget the circumstances, but when I caught that I was using [self class] and changed it to self, everything worked fine. So I don't know what the difference is, but there apparently is a difference.



-- Seth Willits



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: Abstract class with single subclass
      • From: Dave Keck <email@hidden>
References: 
 >Abstract class with single subclass (From: Freddie Tilley <email@hidden>)
 >Re: Abstract class with single subclass (From: Michael Ash <email@hidden>)

  • Prev by Date: Re: Core data, bindings and multiple view NIB
  • Next by Date: Re: NSTextFieldCell Delegate?
  • Previous by thread: Re: Abstract class with single subclass
  • Next by thread: Re: Abstract class with single subclass
  • Index(es):
    • Date
    • Thread