• 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
Receiver type for instance message is a forward declaration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Receiver type for instance message is a forward declaration


  • Subject: Receiver type for instance message is a forward declaration
  • From: Carl Hoefs <email@hidden>
  • Date: Fri, 06 May 2016 13:32:18 -0700

I'm building for iOS 9.3, and am using NSOperationQueue throughout. Once in a while, NSOperationQueue -addOperation: throws an exception. I guess this is a well-known bug going all the way back to 2008. I found Mike Ash's writeup on the issue, and have downloaded his replacement class, RAOperationQueue. However, it was written long ago for GC not ARC. I have one remaining problem in converting the code.

- (BOOL)_runOperationFromList: (RAAtomicListRef *)listPtr sourceList: (RAAtomicListRef *)sourceListPtr
{
	RAOperation *op = [self _popOperation: listPtr];
	if( !op )
	{
		*listPtr = RAAtomicListSteal( sourceListPtr );
		// source lists are in LIFO order, but we want to execute operations in the order they were enqueued
		// so we reverse the list before we do anything with it
		RAAtomicListReverse( listPtr );
		op = [self _popOperation: listPtr];
	}

	if( op )
		[op run];  <-- ERROR HERE

	return op != nil;
}

The error I'm getting is: Receiver type 'RAOperation' for instance message is a forward declaration.

What does this error mean, and how can I fix it?
-Carl

_______________________________________________

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: Receiver type for instance message is a forward declaration
      • From: Quincey Morris <email@hidden>
    • Re: Receiver type for instance message is a forward declaration
      • From: John McCall <email@hidden>
  • Prev by Date: Re: NSTableView is messaging zombie delegate
  • Next by Date: Re: Receiver type for instance message is a forward declaration
  • Previous by thread: Re: NSTableView is messaging zombie delegate
  • Next by thread: Re: Receiver type for instance message is a forward declaration
  • Index(es):
    • Date
    • Thread