Re: bypass NSApp
Re: bypass NSApp
- Subject: Re: bypass NSApp
- From: Julien Isorce <email@hidden>
- Date: Fri, 10 Jul 2009 22:40:50 +0200
well ok,
In GNUstep it's possible to decide which pthread is the "main thread".
I mean the first pthread which call GSRegisterCurrentThread, is the main
thread.
And then the NSApp must be init and run in this main thread, as it's
required on MacOSX.
Is it possible to change the "main thread" as far as Cocoa is concerned, on
MacOSX ? (something like GSRegisterCurrentThread)
In this way no performInMainThreads are borken, and it's a solution to my
problem.
thx everyone for those previous answers.
SIncerely
2009/7/10 Stephen J. Butler <email@hidden>
> On Thu, Jul 9, 2009 at 6:09 PM, Scott Thompson<email@hidden> wrote:
> > To empasize this point. Consider, for example, the method
> > performSelectorOnMainThread:. We use this API in several place to ensure
> > that functionality is performed on the same thread that is processing
> user
> > events. If code were able to change the thread responsible for handling
> > events willy-nilly, that kind of functionality would break badly.
>
> ... or two plugins both trying this hack, and claiming their thread as
> the main thread.
>
> I sympathize with what you're trying to do, Julien, but it's simply
> not going to work. Personally, I'd write a full fledged helper app in
> Cocoa, maybe marking it as a background app (so it doesn't appear in
> the Dock), and then communicate with it in my plugin. There are many
> ways to do this: unix sockets, mach ports, distributed objects, shared
> memory, etc, etc.
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden