• 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
Re: Compiler Error on Class Method?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiler Error on Class Method?


  • Subject: Re: Compiler Error on Class Method?
  • From: Quincey Morris <email@hidden>
  • Date: Wed, 21 Aug 2013 14:09:43 -0700

On Aug 21, 2013, at 09:58 , Dave <email@hidden> wrote:

> Implicit conversion of Objective-C pointer type 'Class' to C pointer type 'struct objc_class *' requires a bridged cast
>
> on the line marked below:
>
>
> + (NSString*) cacheDirectoryPath
> {
> NSString* myReturnValue;													//**************** Error
>
> [self.pDeveloperUtilities logEntryWithMethodName:@"+ cacheDirectoryPath",nil];
>
> myReturnValue = [[super class] cacheDirectoryPath];

The problem must be in the last line quoted above. This is the only place in your code fragment where there is an expression of type 'Class'.

I think what you're actually trying to do is invoke the superclass's implementation, which you would do like this:

	myReturnValue = [super cacheDirectoryPath];

What happens when you try that? Also, are you sure that the parent class's 'cacheDirectoryPath' is actually declared -- in a way that's visible at this point in the compilation -- and is a class method, not an instance method?

Incidentally, even if '[[super class] cacheDirectoryPath]' compiles without errors, it going to execute as if you had written '[[self class] cacheDirectoryPath]', which of course is at best an infinite regress. '[super class]' is *not* the class of the superclass of your class, as you seem to think.

_______________________________________________

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


References: 
 >NSMethodSignature throws an exception encoding GLKMatrix4 (From: Jeff Kelley <email@hidden>)
 >Compiler Error on Class Method? (From: Dave <email@hidden>)

  • Prev by Date: Re: Compiler Error on Class Method?
  • Next by Date: Re: -[NSProxy doesNotRecognizeSelector: error
  • Previous by thread: Re: Compiler Error on Class Method?
  • Next by thread: Don't worry - Fixed - Compiler Error on Class Method?
  • Index(es):
    • Date
    • Thread