You need to generate your own uuid. You can't just reuse the one from
the sample code.
You might read the thread at...
http://www.google.com/search?hl=en&q=d2d536a0-b6fc-11d5-9d10-0060b0fbd8ac&btnG=Google+Search
...to see what other sorts of horror can befall you if you don't use
unique uuids or your loaded typelib does not match the native
implementation. BTW, you might recognize the uuid string in the link
above :)
John.
[EMAIL PROTECTED] wrote:
Hi All,
I am currently working on a Firefox plugin based on the scriptable
sample of Gecko SDK. My IDL file looks like that:
[scriptable, uuid(d2d536a0-b6fc-11d5-9d10-0060b0fbd8ac)]
interface nsIScriptTest : nsISupports
{
void showMessage();
void clear();
attribute string message;
};
showMessage and clear methods work fine.
The trouble comes from message attribute. Although there is no readonly
keyword, JavaScript can just read from this attribute. In the C++ part,
only the GetMessage(char** msg) function is called. The
SetMessage(const char* msg) function is always ignored.
Here is a JS snippet:
<object id="objPlugin" type="application/scripttest-plugin" width=600
height=200></object>
<script>
var plugin = document.getElementById("objPlugin");
document.write("test=" + plugin.message); // WORKS
plugin.message = "hello2"; // DOES NOT WORK
plugin.setAttribute("message", "hello3"); DOES NOT WORK
</script>
This makes me crazy. Please help me if you can.
Thanks in advance,
Alexis
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom