• 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
Need to override +(Class) class?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need to override +(Class) class?


  • Subject: Need to override +(Class) class?
  • From: Dave DeLong <email@hidden>
  • Date: Sat, 27 Sep 2008 20:38:04 -0600

Hi everyone,

I'm building an app, and I've got a bunch of interface object definitions called "InputElements". There are a couple subclasses, such as InputElementButton and InputElementSlider.

I'm building the interface via an "InputMode" object, that contains an array of InputElement objects. As I build the interface, I loop through the InputElement objects in the InputModes array, and am doing the following:

for (InputElement * element in [inputMode elements]) {
	if ([element isKindOfClass:[InputElementButton class]]) {
		//build an InputViewButton
	} else if ([element isKindOfClass:[InputElementSlider class]]) {
		//build an InputViewSlider
	}
}

When I try to compile, I'm getting two errors:

  "_OBJC_CLASS_$_InputViewSlider", referenced from:
      __objc_classrefs__DATA@0 in CosMouseViewController.o
  "_OBJC_CLASS_$_InputViewButton", referenced from:
      __objc_classrefs__DATA@0 in CosMouseViewController.o


My question is, do I need to override the +(Class) class method for each InputElement subclass, and if so how do I make a Class object?


Thanks,

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: Need to override +(Class) class?
      • From: "John C. Randolph" <email@hidden>
    • Re: Need to override +(Class) class?
      • From: Andrew Farmer <email@hidden>
    • Re: Need to override +(Class) class?
      • From: Jamie Hardt <email@hidden>
  • Prev by Date: Re: showing window causes EXC_BAD_ACCESS
  • Next by Date: Re: How to get the current screen resolution on Mac
  • Previous by thread: Re: How to get the current screen resolution on Mac
  • Next by thread: Re: Need to override +(Class) class?
  • Index(es):
    • Date
    • Thread