Hello everyone, I am new on this list, so I hope this is the appropriate place for this kind of questions. If not, please let me know where I should go, and I'll post any future questions there.
I've already sent the same question to one of the Mozilla mailinglists, so please just take a look at the forward below (I hope posting forwards is considered a problem): ---------- Forwarded message ---------- From: Eddy Bruël <[email protected]> Date: Mon, Jun 22, 2009 at 4:40 PM Subject: Question about NSPrincipalClass To: [email protected] Hi guys, I've been trying to build a plugin that will work under OS X for both Firefox and Safari. To that end I've taken the BasicPlugin sample from the Mozilla source tree (which works for both browsers) and have incrementally replaced the source files in that project with our own. The resulting plugin works just fine under Firefox, but refuses to load in Safari. I have tried to debug the plugin, but it looks like the entry points are not even being called. After some searching I found a lead about having to include NPPrincipalClass in my info.plist file, but this raises some questions with me. First of all, even though a large part of our source tree is written in C++, the plugin code is mainly just C. I only use Objective C in some very specific cases, for instance when I need to create a NSWindow. It looks like the NSPrincipalClass should be set to the name of the 'main' class in my plugin. I assume that I have to set NSPrincipalClass to an Objective C class. However, there is no Objective C class in my plugin which could qualify as the main class. There is such a class, but it is written in C++. I've tried setting the NSPrincipalClass to 'NSApplication', but this doesn't work. Do I need to create an Objective C class which serves as the main application class in order to get the plugin to work under Safari? If so, how exactly? Some documentation would be greatly appreciated! However, it would be even better if there were some other way to get the plugin to load in Safari, which does not involve me having to make substantial changes in our current plugin code. Any bright ideas? I'm kind of stuck on this! Cheers, Eddy As an aside, am I correct to assume that adding Objective C / Cocoa based code to my plugin causes the NSPrincipalClass setting to become necessary? The reason I ask is that the original plugin, which uses only C code, *does* seem to work under Safari. So what am I overlooking/doing wrong here? Any help would be greatly appreciated! Eddy
_______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

