• 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
superclass and awakeFromNib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

superclass and awakeFromNib


  • Subject: superclass and awakeFromNib
  • From: Simon Bovet <email@hidden>
  • Date: Sat, 30 Nov 2002 17:52:58 +0100

Hi!

Consider following code (see project attached):

@interface DummyViewA : NSView {
}
@end

@interface DummyViewB : NSViewA {
}
@end

@implementation DummyViewA // same for DummyViewB

-(void)awakeFromNib
{
if ([[self superclass]
instancesRespondToSelector:@selector(awakeFromNib)])
[super awakeFromNib];
}

@end

When [DummyViewB awakeFromNib] is performed during program execution,
it works fine and calls [DummyViewA awakeFromNib]. Now, [self
superclass] in DummyViewA returns DummyViewA (!) and [super
awakeFromNib] throws the exception "*** -[DummyViewB awakeFromNib]:
selector not recognized".

This doesn't happen with instances of DummyViewA....

Any help would be greatly appreciated! Thanks,
Simon

[demime 0.98b removed an attachment of type application/x-stuffit which had a name of awakeFromNib.sit]
_______________________________________________
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: superclass and awakeFromNib
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: Combo Box Problem
  • Next by Date: Add Toolbar to Document Based Project
  • Previous by thread: Re: Piping Strangeness
  • Next by thread: Re: superclass and awakeFromNib
  • Index(es):
    • Date
    • Thread