Re: bypass NSApp
Re: bypass NSApp
- Subject: Re: bypass NSApp
- From: Scott Thompson <email@hidden>
- Date: Fri, 10 Jul 2009 20:16:54 -0500
sure but in the previous mails I tried to explain that I am making a
plugin
(which consists of a dynamic library) of a program which I have not
the
source code.
OK.. the application for which you are writing the plugin... is it a
Cocoa application, a Carbon application, or something else...
If it is a Cocoa or Carbon application then you shouldn't steal the
event stream away from it. You should be able to simply create a
window and expect that the standard event dispatching mechanism will
do the right thing in distributing events to you.
If it is not a Carbon or Cocoa application... then running a separate
application environment in a separate thread within the application
can only interfere with the behavior of the application itself.
To twist a phrase from The Princess Bride (not sure how it translates
to French):
I do not think you need to do what you think you need to do.
So the final question: is there a way to make [NSThread
isMainThread] return
YES in a thread different that the main thread of a process, on
MacOSX ?
No... nor is it likely to be something you want to do. You should not
need to steal the main thread away from the application in order to
receive events.
Well... you could subclass NSThread and override isMainThread to
return YES... but that's not productive at all.
Scott
_______________________________________________
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