• 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
Calling a super call method from and instance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Calling a super call method from and instance


  • Subject: Calling a super call method from and instance
  • From: David Alter <email@hidden>
  • Date: Thu, 7 May 2009 13:37:22 -0700

In Objective-C 1.0 (not 2.0 ) is there a way to call a super class method if
I have a reference to the class
See bellow
@interface MyClassA : NSObject {
}
-(void) aboutMe ;
@end
@implementation MyClassA

-(void) aboutMe ;
{
NSLog(@"I'm Class A");
}
@end

@interface MyClassB :MyClassA {
}
-(void) aboutMe ;
@end
@implementation MyClassB
-(void) aboutMe ;
{
NSLog(@"I'm Class B");
}
@end

-(void) someMethod:(MyClassB*) myClass
{

//I want to call MyClassB's super of aboutMe. This should output "I'm Class
A"

}
 thanks for the help

-dave
_______________________________________________

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: Calling a super call method from and instance
      • From: Jonathan Hess <email@hidden>
  • Prev by Date: Re: Force AppleSpell.service to launch
  • Next by Date: Re: Strategy for acting on changes in child objects?
  • Previous by thread: Re: losing focus momentarily, over and over again
  • Next by thread: Re: Calling a super call method from and instance
  • Index(es):
    • Date
    • Thread