• 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
subclass weirdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

subclass weirdness


  • Subject: subclass weirdness
  • From: Koen van der Drift <email@hidden>
  • Date: Sun, 29 Jun 2003 22:35:07 -0400

Hi,

I thought by now I understand subclassing, but this is driving me crazy ;)

Consider a base class and it's subclass: MyBase and MySub, both of which have a method foo to which I pass an NSString:

-(void)foo:(NSString *)s
{
blahWithString...
}


and for MySub:

-(void)foo:(NSString *)s
{
[super foo:s];

moreBlahWithString...
}


When I call [mySub foo:aString], only the base class gets called, so moreBlahWithString never gets executed. I stared at this too long now, and I don't see what's wrong.

any ideas?

thanks,

- Koen.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: subclass weirdness
      • From: Neil Earnshaw <email@hidden>
    • Re: subclass weirdness
      • From: Andy Lee <email@hidden>
References: 
 >Re: The more I read about MVC, the more confused I get... (From: Koen van der Drift <email@hidden>)

  • Prev by Date: Re: @Strings and strings in C
  • Next by Date: Re: subclass weirdness
  • Previous by thread: Re: The more I read about MVC, the more confused I get...
  • Next by thread: Re: subclass weirdness
  • Index(es):
    • Date
    • Thread