Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Carl Hoefs
> On May 10, 2016, at 5:16 PM, Roland King wrote: > >> >> 2016-05-10 16:58:36.066 iApp[2549:2131821] *** Terminating app due to >> uncaught exception 'NSInternalInconsistencyException', reason: '( >>"> NO; view = ; target= <(action=oneFingerDoubleTap:, >> target=)>; numberOfTapsRequired =

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Roland King
> > 2016-05-10 16:58:36.066 iApp[2549:2131821] *** Terminating app due to > uncaught exception 'NSInternalInconsistencyException', reason: '( >" NO; view = ; target= <(action=oneFingerDoubleTap:, > target=)>; numberOfTapsRequired = 2>", >" ; target= <(action=tapAndAHalf:, > target=)>>",

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Carl Hoefs
> On May 10, 2016, at 5:04 PM, Quincey Morris > wrote: > > On May 10, 2016, at 16:43 , Roland King > wrote: >> >> Well no he hasn’t > > Correct … no he hasn’t. I mis-edited a longer draft of the post. > >> Now that I've changed things over to use the context value, I g

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Quincey Morris
On May 10, 2016, at 16:43 , Roland King wrote: > > Well no he hasn’t Correct … no he hasn’t. I mis-edited a longer draft of the post. > Now that I've changed things over to use the context value, I get this at the > moment I add an NSOperation to the NSOperationQueue: > > [uploadQueue add

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Carl Hoefs
> On May 10, 2016, at 4:55 PM, Carl Hoefs > wrote: > > >> On May 10, 2016, at 4:39 PM, Quincey Morris >> wrote: >> >> On May 10, 2016, at 16:22 , Carl Hoefs > > wrote: >>> >>> I will set 'context' and use it in my check instead. >> >> Yup, use the co

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Carl Hoefs
> On May 10, 2016, at 4:39 PM, Quincey Morris > wrote: > > On May 10, 2016, at 16:22 , Carl Hoefs > wrote: >> >> I will set 'context' and use it in my check instead. > > Yup, use the context to decide whether to call super *and return* but nothing > el

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Roland King
> On 11 May 2016, at 07:39, Quincey Morris > wrote: > > On May 10, 2016, at 16:22 , Carl Hoefs wrote: >> >> I will set 'context' and use it in my check instead. > > Yup, use the context to decide whether to call super *and return* but nothing > else. Once you get past that check, don’t call

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Roland King
> On 11 May 2016, at 07:22, Carl Hoefs wrote: > >> >> > Okay... It appears that for some odd reason, once in a blue moon, 'object' > and 'keyPath' aren't what they're supposed to be, so I super it, and it blows. > …. > > I will set 'context' and use it in my check instead. > -Carl Well yo

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Quincey Morris
On May 10, 2016, at 16:22 , Carl Hoefs wrote: > > I will set 'context' and use it in my check instead. Yup, use the context to decide whether to call super *and return* but nothing else. Once you get past that check, don’t call super. > It appears that for some odd reason, once in a blue moon

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Carl Hoefs
> On May 10, 2016, at 4:13 PM, Quincey Morris > wrote: > > On May 10, 2016, at 16:05 , Carl Hoefs > wrote: >> >> I'm not sure how context is to be used here > > It has to be a value that’s unique to the piece of code that tests it. In > effect, this me

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Quincey Morris
On May 10, 2016, at 16:11 , Jens Alfke wrote: > > what goes wrong if it’s NULL If anything else uses NULL, then your observation is not uniquely identified, which means that: — you might respond to a notification registered by an ancestor class of your observer instance, breaking some of its

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Roland King
> On 11 May 2016, at 07:11, Jens Alfke wrote: > > >> On May 10, 2016, at 4:05 PM, Carl Hoefs >> wrote: >> >> Yes, yes, and yes! I'm using a nil context. I'm not sure how context is to >> be used here... Is this an arbitrary value that I check in >> -observeValueForKeyPath? > > Yes, but I’

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Quincey Morris
On May 10, 2016, at 16:05 , Carl Hoefs wrote: > > I'm not sure how context is to be used here It has to be a value that’s unique to the piece of code that tests it. In effect, this means unique to the class that creates and responds to the observations. If you’re in Obj-C, the usual trick is t

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Jens Alfke
> On May 10, 2016, at 4:05 PM, Carl Hoefs > wrote: > > Yes, yes, and yes! I'm using a nil context. I'm not sure how context is to be > used here... Is this an arbitrary value that I check in > -observeValueForKeyPath? Yes, but I’m not aware of it being required … what goes wrong if it’s NULL

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Carl Hoefs
> On May 10, 2016, at 3:52 PM, Quincey Morris > wrote: > > On May 10, 2016, at 13:38 , Carl Hoefs > wrote: >> >> At last, it blew again! > > Well, here’s the exception message: > >> An -observeValueForKeyPath:ofObject:change:context: message was receiv

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Quincey Morris
On May 10, 2016, at 13:38 , Carl Hoefs wrote: > > At last, it blew again! Well, here’s the exception message: > An -observeValueForKeyPath:ofObject:change:context: message was received but > not handled. > Key path: operations > Observed object: {name = 'Upload Queue'} > Change: { >kind =

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Jens Alfke
> On May 10, 2016, at 1:38 PM, Carl Hoefs > wrote: > > )}: An -observeValueForKeyPath:ofObject:change:context: message was received > but not handled. > Key path: operations > Observed object: {name = 'Upload Queue'} An object got a KVO notification but doesn’t have a observer method to handl

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Carl Hoefs
> On May 9, 2016, at 1:51 PM, Quincey Morris > wrote: > > Perhaps it’s worth going back to that, in the hope that your crashes get more > frequent, and you can investigate what really causes them. At last, it blew again! Can someone interpret this? The context is that I touched a button in m

Re: Receiver type for instance message is a forward declaration

2016-05-09 Thread Quincey Morris
On May 9, 2016, at 11:26 , Carl Hoefs wrote: > > Alas, there appear to be no GCD dispatch queue introspection functions, > specifically to find out what is executing (if anything) and what's waiting > in the queue. Or did I overlook something? Also, no, I don’t think so. There is dispatch_get/

Re: Receiver type for instance message is a forward declaration

2016-05-09 Thread Carl Hoefs
> On May 6, 2016, at 3:45 PM, Carl Hoefs wrote: > >> These days, if I had any doubts about NSOperationQueue, I’d switch to using >> GCD directly. There’s very little that NSOperationQueue does that GCD doesn’t Alas, there appear to be no GCD dispatch queue introspection functions, specificall

Re: Receiver type for instance message is a forward declaration

2016-05-06 Thread Quincey Morris
On May 6, 2016, at 14:58 , Alex Zavatone wrote: > > Can we come up with a suitable set of tests to replicate and verify this This was the code from the forum thread that I played around with: > class ViewController: UIViewController { > let backgroundQueue = dispatch_queue_create("backgro

Re: Receiver type for instance message is a forward declaration

2016-05-06 Thread Carl Hoefs
> On May 6, 2016, at 2:34 PM, Quincey Morris > wrote: > > On May 6, 2016, at 13:32 , Carl Hoefs > wrote: >> >> 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 fo

Re: Receiver type for instance message is a forward declaration

2016-05-06 Thread Alex Zavatone
Can we come up with a suitable set of tests to replicate and verify this, like a bunch of dispatch_async calls to increment an NSInteger and then to decrement the NSInteger that repeats while true? Sent from my iPhone > On May 6, 2016, at 5:34 PM, Quincey Morris > wrote: > > ** There is, how

Re: Receiver type for instance message is a forward declaration

2016-05-06 Thread Quincey Morris
On May 6, 2016, at 13:32 , Carl Hoefs wrote: > > 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. Ho

Re: Receiver type for instance message is a forward declaration

2016-05-06 Thread Jens Alfke
> On May 6, 2016, at 1:42 PM, Carl Hoefs wrote: > > I would have thought that this earlier line would have been flagged if > RAOperation.h hadn't been included: > > RAOperation *op = [self _popOperation: listPtr]; There must be a forward declaration (“@class RAOperation”) somewhere abov

Re: Receiver type for instance message is a forward declaration

2016-05-06 Thread Carl Hoefs
> On May 6, 2016, at 1:35 PM, John McCall wrote: > >> On May 6, 2016, at 1:32 PM, Carl Hoefs >> wrote: >> 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

Re: Receiver type for instance message is a forward declaration

2016-05-06 Thread John McCall
> On May 6, 2016, at 1:32 PM, Carl Hoefs wrote: > 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 is

Receiver type for instance message is a forward declaration

2016-05-06 Thread Carl Hoefs
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, RAOperati