> But this is for Carbon application, isn't it? I have a cocoa one...

No – NSRunLoop is built atop of CFRunLoop, just as many Foundation
classes are built atop CoreFoundation classes. Carbon has nothing to
do with it.

> Does this call operate with the core foundation run loop, bypassing
> cocoa's one?

They're one and the same.

> And if it's allowed to use it in cocoa app, what should i specify as
> the second parameter (timeInterval)? 0 doesn't seem to work at all
> (the run lop is not relaunched at all), 1 sec gives big delays, if
> nothing has been pressed - it seems that "sourceHandled" means "at
> least one event in queue is handled, if the queue is empty - just wait
> that timeinterval". But then, setting any interval>0, i force my
> application to wait, instead of processing that big file.
> Or maybe i'm understanding something wrong?

For your situation, you shouldn't need to deal with the run loop
directly. Normally you'd want to use a separate thread, NSOperation,
etc., but since you're using AppleScript, that's out of the question
since it's confined to the main thread.

See the docs for NSApplication's -runModalSession: – that's probably
your best bet.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to