Re: bypass NSApp
Re: bypass NSApp
- Subject: Re: bypass NSApp
- From: Julien Isorce <email@hidden>
- Date: Mon, 27 Jul 2009 16:14:02 +0200
Hi,
I took all your remarks into account and I decided to
use the event dispatching system that uses the C third party program.
So I post an event which will be handled by the main loop of the C third
party program.
The attached callback intializes the nsapp and in the main thread.
To get ride of [NSapp run], I am also posting at regular time, an event and
the attached callback calls
[NSApp nextEventMatchingMask..], [NSApp sendEvent..].
It also resolves the problem of having several plugins like that (or loading
this same plugin several times)
The solution is ok but I am still convinced that the NSRunLoop could/should
get the ability to perform/handle the events that the NSApp is the only one
able to do.
Anyway, thx for all your answers/advises
Julien
2009/7/11 Stephen J. Butler <email@hidden>
> On Fri, Jul 10, 2009 at 6:50 PM, Julien Isorce<email@hidden>
> wrote:
> > you are enterely right so then we are moving to the other solution:
> bypass
> > NSApp,
> > making a classic NSRunLoop but add to it the ability to perform/handle
> the
> > events that the NSApp usually is the only one able to do.
> >
> > I am open to any solution, even if it requires to have only one plugin
> which
> > has the "main thread" (=only one plugin based on Cocoa)
>
> I just took a break and went swimming, and while I was swimming I
> pondered the question, "What is REALLY Julien's problem?" I think I
> figured it out!
>
> I bet you ALREADY have a plugin written in GNUstep working on Linux or
> some other platform. You were hoping you could just recompile the
> plugin on OS X and it would work here too. But as we've been trying to
> tell you, there is no way this will ever work.
>
> But MacPorts lets you build GNUstep for OS X! So, if this is your
> situation, the way to make this all work is compile GNUstep for OS X,
> and link your app against it like you would in Linux.
> _______________________________________________
>
> 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