Re: Problem with stopModalWithCode on a different thread

2010-06-23 Thread John Joyce
On Jun 23, 2010, at 9:16 AM, Bill Appleton wrote: >> Plugins don’t impose themselves, nor are they invoked by a user; they’re > always invoked by content on a web page. The user might go to that web page > specifically to use the plugin, or it might be a side effect, but the > mechanism is the sa

Re: Problem with stopModalWithCode on a different thread

2010-06-23 Thread Bill Appleton
> Plugins don’t impose themselves, nor are they invoked by a user; they’re always invoked by content on a web page. The user might go to that web page specifically to use the plugin, or it might be a side effect, but the mechanism is the same regardless. there is a big difference between navigatin

Re: Problem with stopModalWithCode on a different thread

2010-06-23 Thread Jens Alfke
On Jun 22, 2010, at 7:49 PM, Bill Appleton wrote: > i am pointing out that there is a giant, giant, giant difference between > plugins that impose themselves on the user and those that are invoked because > the user wants them. Plugins don’t impose themselves, nor are they invoked by a user; t

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Bill Appleton
>> I don’t understand what this means. What are you asking for? i am pointing out that there is a giant, giant, giant difference between plugins that impose themselves on the user and those that are invoked because the user wants them. all of the security stuff you are talking about is appropriate

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Jens Alfke
On Jun 22, 2010, at 5:28 PM, Bill Appleton wrote: > so different vendors whip out "security" for different reasons. on mac, it is > to prevent browser crashes, thus the separate process. on windows, it is all > about preventing system corruption, thus protected mode This isn’t a Windows thing.

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Bill Appleton
so different vendors whip out "security" for different reasons. on mac, it is to prevent browser crashes, thus the separate process. on windows, it is all about preventing system corruption, thus protected mode -- which is especially funny, because you are limited in where you can WRITE a file but

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Jens Alfke
On Jun 22, 2010, at 4:47 PM, Bill Appleton wrote: > this IS sandboxed --- its in a separate process That’s not what “sandboxed” means. It refers to a process that’s running with reduced privileges, i.e. it only gets to “play in the sandbox” without having full access to the computer. For examp

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Bill Appleton
then what will you be able to do? nothing? compare what is possible on windows and mac, they can't get too far out of line. this IS sandboxed --- its in a separate process On Tue, Jun 22, 2010 at 4:02 PM, Jens Alfke wrote: > > On Jun 22, 2010, at 2:40 PM, Charles Srstka wrote: > > You get a se

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Jens Alfke
On Jun 22, 2010, at 2:40 PM, Charles Srstka wrote: > You get a separate process for your plug-in, but there is no guarantee that > that process will have a full Cocoa environment running. You are recommended > to use only plug-in APIs as much as possible, and not to spawn new windows. Yup. The

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Charles Srstka
On Jun 22, 2010, at 4:36 PM, Bill Appleton wrote: > all that stuff in the docs you mention is about interacting with the browser > > now the browser is a whole separate application, its talking to the > WebKitPluginHost through ports > > so thats what they are talking about -- if you want a pop

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Bill Appleton
all that stuff in the docs you mention is about interacting with the browser now the browser is a whole separate application, its talking to the WebKitPluginHost through ports so thats what they are talking about -- if you want a popup menu on the browser screen you have to call their API but in

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Charles Srstka
On Jun 22, 2010, at 4:14 PM, Bill Appleton wrote: > Not sure I understand all the issues but this should be good news for Cocoa > lovers: > > 1) When Safari runs as 64 bit it loads and runs a 32 bit or 64 bit Cocoa > NPAPI plugin just fine. The 32 bit version of Safari will only run 32 bit > N

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Bill Appleton
Hi All, Not sure I understand all the issues but this should be good news for Cocoa lovers: 1) When Safari runs as 64 bit it loads and runs a 32 bit or 64 bit Cocoa NPAPI plugin just fine. The 32 bit version of Safari will only run 32 bit NPAPI plugins. 2) The exact same 32 bit plugin for Safari

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Corbin Dunn
On Jun 21, 2010, at 11:09 AM, Bill Appleton wrote: > Hi All, > > In 64 bit Safari our NPAPI plugin needs to use a few system dialogs for > opening files, printing, etc. > > These system dialogs call stopModalWithCode to deliver the result of the > dialog interaction back to the runModalForWindo

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Jens Alfke
On Jun 22, 2010, at 2:02 PM, Charles Srstka wrote: > Unless your plug-in is 64-bit only, there’s the chance the 32-bit binary > could load into a non-Cocoa browser such as Firefox. I’m not sure Chrome is 64-bit yet, but it probably will be soon. Using AppKit in a Chrome plugin will crash and b

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Charles Srstka
On Jun 22, 2010, at 3:58 PM, Bill Appleton wrote: > Hi Charles, > > Under Safari 64 bit you HAVE to use Cocoa -- there ain't nuthin' else. > > By the way i just found out that this problem is FIXED in the latest version > of Safari. > > > Thanks all, > > bill Unless your plug-in is 64-bit o

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Bill Appleton
Hi Charles, Under Safari 64 bit you HAVE to use Cocoa -- there ain't nuthin' else. By the way i just found out that this problem is FIXED in the latest version of Safari. Thanks all, bill On Tue, Jun 22, 2010 at 1:10 PM, Charles Srstka wrote: > On Jun 22, 2010, at 1:54 PM, Bill Appleton w

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Charles Srstka
On Jun 22, 2010, at 1:54 PM, Bill Appleton wrote: > Hi all, > > Thanks for the tips. > > i have verified that this code actually IS running on the main thread, i was > wrong about that in my original message. Here is the situation. WebKit > launches WebKitPluginHost.app and that is the process

Re: Problem with stopModalWithCode on a different thread

2010-06-22 Thread Bill Appleton
Hi all, Thanks for the tips. i have verified that this code actually IS running on the main thread, i was wrong about that in my original message. Here is the situation. WebKit launches WebKitPluginHost.app and that is the process that runs my NPAPI plugin. The plugin is called on the main thread

Re: Problem with stopModalWithCode on a different thread

2010-06-21 Thread Charles Srstka
On Jun 21, 2010, at 7:33 PM, Jens Alfke wrote: > In general, if you have some kind of background activity that needs to call > some AppKit method like this, use -performSelectorOnMainThread:. If you’re requiring 10.6 or greater, you can use one of these methods as well: [[NSOperationQueue mainQ

Re: Problem with stopModalWithCode on a different thread

2010-06-21 Thread Jens Alfke
On Jun 21, 2010, at 11:09 AM, Bill Appleton wrote: > In 64 bit Safari our NPAPI plugin needs to use a few system dialogs for > opening files, printing, etc. > > These system dialogs call stopModalWithCode to deliver the result of the > dialog interaction back to the runModalForWindow function >

Problem with stopModalWithCode on a different thread

2010-06-21 Thread Bill Appleton
Hi All, In 64 bit Safari our NPAPI plugin needs to use a few system dialogs for opening files, printing, etc. These system dialogs call stopModalWithCode to deliver the result of the dialog interaction back to the runModalForWindow function But the stopModalWithCode function does not work on ano