Re: Need advice on a custom run-loop mode

2016-05-20 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 updates the wind

Re: Need advice on a custom run-loop mode

2016-05-20 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 believe) that’

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 a

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)performU

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? > > Yes. > >> If the answer is yes, how do

Scrolling table view when the keyboard appears

2016-05-20 Thread Doug Hill
I’m implementing a chat message view with a table view and a text field underneath it. I want the most recent messages at the bottom, and the scroll position always to stay at the last row in the table. There are some tricks to making sure the table scrolls to the bottom when it’s first drawn a

Re: NSSplitViewController contents are shifted at first

2016-05-20 Thread Rick Mann
> On May 20, 2016, at 07:49 , Jerry Krinock wrote: > > >> On 2016 May 20, at 00:00, Rick Mann wrote: >> >> I have a Storyboard using autolayout constraints. I have an >> NSWindowController with an NSSplitViewController as its content view >> controller. That has two sub controllers. The lef

Re: Question about orderFront/orderBack etc.

2016-05-20 Thread Dave
Hi Quincey, > On 20 May 2016, at 18:13, Quincey Morris > wrote: > > On May 20, 2016, at 07:53 , Dave > wrote: >> >> I’m thinking I should call “orderFront” on my fake window when the window in >> the real app gets focus, but do I need to call “orderBack" or wh

Re: Question about orderFront/orderBack etc.

2016-05-20 Thread Quincey Morris
On May 20, 2016, at 07:53 , Dave wrote: > > I’m thinking I should call “orderFront” on my fake window when the window in > the real app gets focus, but do I need to call “orderBack" or whatever on the > window that used to be in front? It’s not clear what you’re asking. If you “order front” on

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 operation is done? Yes, use a

Question about orderFront/orderBack etc.

2016-05-20 Thread Dave
Hi All, I’ve written some code that keep track of the currently active Application and the currently focused window within that application. Basically I have a number of windows in my own app and I keep a mirror of the Apps I am interested in, for instance, if I’m working with TextEdit and Prev

Re: NSSplitViewController contents are shifted at first

2016-05-20 Thread Jerry Krinock
> On 2016 May 20, at 00:00, Rick Mann wrote: > > I have a Storyboard using autolayout constraints. I have an > NSWindowController with an NSSplitViewController as its content view > controller. That has two sub controllers. The left one has an NSOutlineView > that has top,left,right, and bott

Re: Opening a file but not associating with NSDocument

2016-05-20 Thread Jerry Krinock
> On 2016 May 19, at 23:40, Rick Mann wrote: > > By "Reader," do you mean "Viewer?" I see no "Reader" option. Yes, I remembered the wrong word. English is so redundant. :) > Also, what do you mean "have no windows?" I just don't create anything in > -makeWindowControllers? Correct. > I'm c

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 predefine

NSSplitViewController contents are shifted at first

2016-05-20 Thread Rick Mann
I have a Storyboard using autolayout constraints. I have an NSWindowController with an NSSplitViewController as its content view controller. That has two sub controllers. The left one has an NSOutlineView that has top,left,right, and bottom constraints to its containing view, and a width >= 200.