Hi All,

Thanks for all help on the last question, here is one on a similar vein:

This is all Class methods, no instances are allocated or intended to be allocated at this stage.

in + Method in a subclass:

[[self class] someMethod];

This calls +someMethod in the current class, if it exists, if not, it calls in one of the super-classes if it exists. Is this correct?

If one of the super classes calls [[self class] someMethod]; It will call as high up the chain as possible, resulting in an infinite loop in this case?

Is there a diagram somewhere showing how this works for the 4 cases of:

1.  [[self class] +someMethod];
2.  [[super class] +someMethod];
3.  [super +someMethod];
4. [[self superclass] +someMethod];

It does seem logical to expect that if:

[[self class] someMethod]; calls +someMethod the [[super class] +someMethod] would call +someMethod in the Superclass or is it just me??? lol

Thanks a lot
Dave

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to