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 (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