Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-08 Thread eveningnick eveningnick
Hello Fritz > You are understood: You want to learn how the high-level application and > event API works by trying to recreate (or at least explain) it using > lower-level API. > > You can't do it. At least not in general. > > To provide the high-level functionality, Apple uses the published low-l

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-08 Thread eveningnick eveningnick
> > On >10.6 you can safely execute Apple scripts from a secondary thread (see > previous thread on this matter). > > Well, I just checked this using an NSOperation object which executes a > script. The operation can be alternatively executed on the main thread > scheduled by the global queue [NSOp

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-08 Thread Andreas Grosam
On Nov 7, 2010, at 4:35 PM, eveningnick eveningnick wrote: >> - Multiple threads, figure out your bug with synchronization around >> AppleScripts (there is no reason the library would run slower just because >> you add a new thread). >> > I am not doing no synchronization at all, nor i need any

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-07 Thread Matt Neuburg
On Sun, 7 Nov 2010 17:35:57 +0200, eveningnick eveningnick said: >Just for the sake of my own understanding. There's nothing extraordinary i >am doing there, but for example, i need to "delay" the launch of my >application and registering all the observers/event taps before the "master >applicati

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-07 Thread Fritz Anderson
On 7 Nov 2010, at 9:35 AM, eveningnick eveningnick wrote: >> You seem to be trying to find ways to use the frameworks in ways that are >> not intended. Why are you not using NSApplicationMain in the normal way? >> > Just for the sake of my own understanding. There's nothing extraordinary i > am d

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-07 Thread Sherm Pendley
On Sun, Nov 7, 2010 at 10:35 AM, eveningnick eveningnick wrote: > >> You seem to be trying to find ways to use the frameworks in ways that are >> not intended. Why are you not using NSApplicationMain in the normal way? >> > Just for the sake of my own understanding. An admirable goal to be sure.

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-07 Thread eveningnick eveningnick
Hello Scott > You seem to be trying to find ways to use the frameworks in ways that are > not intended. Why are you not using NSApplicationMain in the normal way? > Just for the sake of my own understanding. There's nothing extraordinary i am doing there, but for example, i need to "delay" the la

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-07 Thread Scott Ribe
On Nov 7, 2010, at 4:05 AM, eveningnick eveningnick wrote: > I am trying to understand these techniques step by step, it is really > difficult for me when everything is hidden :( You seem to be trying to find ways to use the frameworks in ways that are not intended. Why are you not using NSApp

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-07 Thread Andy Lee
On Nov 7, 2010, at 6:05 AM, eveningnick eveningnick wrote: >>> I assume i should call a one run through the runloop manually, but how? >> I recommend that you not attempt to "invert" the event loop or build one >> yourself. The "modal session" methods of NSApplication >> (-beginModalSessionForWind

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-07 Thread Fritz Anderson
On 7 Nov 2010, at 5:05 AM, eveningnick eveningnick wrote: > I am sorry, it was -setTitleWithMnemonic method of NSTextField, i wrote that > by memory I am not sure why you use setTitleWithMnemonic:. The documentation for that method warns that mnemonics are not supported in Mac OS X. Six classes

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-07 Thread eveningnick eveningnick
Hello Ken If you don't have a handle on the basics, it's foolhardy to get into > advanced techniques. I am trying to understand these techniques step by step, it is really difficult for me when everything is hidden :( > > > I assume i should call a one run through the runloop manually, but how

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-06 Thread Ken Thomases
On Nov 6, 2010, at 9:19 PM, eveningnick eveningnick wrote: > I am trying to understand how does Run loop work. > Basically the problem i need to solve is like the following: > I have a Cocoa application, which is a little "adhoc" - for better > understanding of the "internals" of my app i do not

Understanding the Run loop idea and the updating of controls during long operations

2010-11-06 Thread eveningnick eveningnick
Hello I am trying to understand how does Run loop work. Here is my story (i am sorry, it is a little long, but to avoid questions "why do you need that" and others i thought better to write it down here). I also read the CFRunLoop documentation, and event processing guide in Cocoa, but I couldn't p