You probably don't want to use supplied window, as it will not allow you
to process events correctly (you may try, though). I've got to XEmbed
windowing. In general it means - you create your own window, that is
under your full control, but it's parent should be browser-supplied
window. Don't know if it works on Windows, but for X11 it's a nice way to
go.
With a windowless plugin you only get a HDC, and it is not guaranteed to remain the same each time RefreshEvent is fired (which is the only time you're allowed to draw), just that when you get it you'll be able to draw to the HDC that the PluginWindowless object has at that point with the window sizes that it has.
Note that we still lack windowless support on Linux for the simple reason that I haven't a clue how it would work...
Richard
I've a plugin that sends events back to JS. I use the registerEvent() calls in my JSAPI constructor. On the JS side, I've code that register the callback method to the events. Pretty much copy from the examples, where 'obj' is the plugin object element. I added to alert to make sure the handler is added successfully to the plugin object.
function addEvent(obj, name, func)
{
if (window.addEventListener) {
obj.addEventListener(name, func, false);
} else {
var res = obj.attachEvent("on"+name, func);
alert("Added 'on'" + name + "' handler. result = " + res);
}
}
It works on most windows browsers, but there is one client machine where it doesn't work on an IE7 with Win7 64bit. In that case, the event handlers are never triggered. From the plugin logs, the plugin performed all the functions that are requested and the logic to call FireEvent() were being invoked.
Any ideas in what would prevent events from triggering the handlers in IE?
Thanks,
kam
Sometimes IE isn't real transparent as to how soon it will let you start using the plugin.
My thinking is that maybe you think you're attaching an event but actually it's being silently lost because you're doing it too early in the initialization (which shouldn't be possible, but that's IE for ya)
Richard
I also tried a few different addEvent() implementation out there, and using prototypes to do $('pluginElement').observe() etc. None of the other mechanism works for me at all in any platform.
kam
Without being able to reproduce this it's really hard to track it down; when you call attachEvent are the ConnectionPoint methods in JSAPI_IDispatchEx.h getting called?
One thing to try that I have seen before is that sometimes if the registry gets messed up somehow you may need to search for and remove all references to any of the 6 CLSIDs from PluginConfig.cmake and then try installing again.
:-/
Richard
Could you try that and let me know if it makes a difference in your case?
Otherwise I'm at a loss as to how to help you. If someone experiencing the IE event issue could give me remote access to a box, I could maybe track it down that way. If I can't see it, though, it's really hard to figure out what might be happening :-/
Richard