Hi, I believe I am not the only one in this....
I have an XPCOM componenent that is instantiated by some Java Script as part of an XUL dialog. One of the dialog button call a method on the XPCOM component that gather some information from a server (some long processing SQL Statements...) However, this operation take time and ideally should be done into a background thread, and reporting progress to the XUL/GUI thread. Now the problem is: How to feed progress information back to the initial dialog ? I had a look at addEventListener but I am going nowhere. Is it just a question of creating a nsIDOMEvent in the XPCOM component and throw it to the XUL Dialog ? But how do I register my JavaScript callback function ??? I am thinking of trying to call a JS Function implemented in the dialog from the worker thread but.... - I doubt this will work anyway because that would be a cross thread call, and that may lead to sync problems. - I don't manage to do it anyway as I don't know how to get the JSContext. Has anyone any pointer to achieve this ? Many many thanks Josh _______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
