Re: Need advice on a custom run-loop mode

2016-05-22 Thread Jens Alfke
> On May 20, 2016, at 11:55 PM, Graham Cox wrote: > > The view is definitely being marked dirty, and I’m explicitly calling > -displayIfNeeded, and -drawRect: is getting called as a result. But the > screen is not updated. I tried making an explicit call to flush the

Re: Need advice on a custom run-loop mode

2016-05-21 Thread Graham Cox
> On 21 May 2016, at 3:48 PM, Roland King wrote: > > 1) putting the normal runloop mode back to test if your updates now do get > shown animated, that will assure you it’s the runloop mode causing it not > something else. Running in normal, event-tracking or modal panel mode

Re: Need advice on a custom run-loop mode

2016-05-21 Thread Quincey Morris
On May 20, 2016, at 22:48 , Roland King wrote: > > I wondered about this when you first posted about using a custom runloop mode. I always think runloops are like Fred Flintstone’s feet when he drives his car. There’s something undefinably wrong with the concept, but (I’m led to

Re: Need advice on a custom run-loop mode

2016-05-20 Thread Roland King
> > As you can see I’ve experimented with the end date, but seems that > -distantPast works well enough. I’ve also tried forcing a window redisplay on > each pass (as here) but it doesn’t appear to do anything; my understanding > was that the runloop should take care of this anyway. > > What

Re: Need advice on a custom run-loop mode

2016-05-20 Thread Graham Cox
Maybe spoke too soon, as so far I’ve been unsuccessful in getting this to work as I wish. My code does perform the series of undos, but I can’t see the results until the end - the window isn’t refreshed on each pass of the runloop as I expected. Here’s my code: - (BOOL)

Re: Need advice on a custom run-loop mode

2016-05-20 Thread Graham Cox
Great, thanks! Perfect answer,actually... —Graham > On 21 May 2016, at 1:00 AM, Jens Alfke wrote: > > >> On May 20, 2016, at 12:58 AM, Graham Cox wrote: >> >> First question: does that even sound like a proper use for a custom run-loop >> mode?

Re: Need advice on a custom run-loop mode

2016-05-20 Thread Jens Alfke
> On May 20, 2016, at 12:58 AM, Graham Cox wrote: > > First question: does that even sound like a proper use for a custom run-loop > mode? Yes. > If the answer is yes, how do I cause the run loop to run in that mode? Do I > have to run the loop mysef until the

Need advice on a custom run-loop mode

2016-05-20 Thread Graham Cox
Hi all, I have a situation that I *think* calls for a custom run-loop mode, but I’ve never used such a thing before, so it’s not that clear how to do it. The situation is this: I want to be able to schedule a repeating timer which will repeatedly invoke Undo until it reaches a certain