I'm writing an xpcom object that requires callback functinality similar
to the xmlhttprequest object. This is what I have so far:
[scriptable, uuid(43524)]
interface Callback : nsISupports
{
void CallbackFunc();
};
[scriptable, uuid(1234)]
interface Device : nsISupports
{
attribute Callback objCallback;
};
In javascript, I create an object that has a function called
callBackFunc() and I use the setCallBack function of the Device object
to set the callback object. After setting the callback object, I'm
able to call the javascript function until the javascript code exits.
Then, when the device object tries to call the callback, the program
hangs. I took a look at the xmlhttprequest code to get some pointers
and found that that object uses a few javascript objects to save the
current javascript context. After adding similar code, I get a 'too
much recursion' error when I call the callback object. Does anyone
have any suggestins?
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom