• 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
Selector Not Recognized
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Selector Not Recognized


  • Subject: Selector Not Recognized
  • From: David Alter <email@hidden>
  • Date: Tue, 11 Jul 2006 14:49:54 -0700

I have a sub class of an object. The sub class has no additional instance variables, just some additional methods. I get a pointer to the parent object and I want to call methods available in the sub classed objects. So I tried to case it and make the call. To this I get "selector not recognized". Is there a way to do this? I can do this in C++.

thanks for the help

-dave


Example bellow if needed

@interface myParent : NSObject {
	int somedata
}

- (int) getSomeDataPlusOne; //

@end


In the main body of code myParent * myObj = [[myParent alloc] init];

	mySub * mysub = (mySub *) myObj;

int val = [mysub getSomeDataPlusOne]; // It chokes here with "selector not recognized"



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Selector Not Recognized
      • From: "Shawn Erickson" <email@hidden>
  • Prev by Date: Re: View disappears with NSViewAnimation
  • Next by Date: Re: View disappears with NSViewAnimation
  • Previous by thread: Re: list of invar names
  • Next by thread: Re: Selector Not Recognized
  • Index(es):
    • Date
    • Thread