Vadim Atlygin wrote:
<snip />
>> Also, you aren't changing |window| (which I would have checked anyways)
>> accidentally?
>>
> That actually might be the problem.
> You see, actually I have the following situation: I have a dialog
> window and <browser/> element inside. I render some html code in
> onload event handler and with Windows and Linux that works fine but
> under Mac html content appear for a second and then just disappear for
> no apparent reason. I thought I might just check if it is empty and
> re-render it but then I ran into bug described earlier. Since I'm
> getting my window as browser.contentWindow it might be just it, looks
> like original window got lost inside Thunderbird somewhere with my
> html content.
>
> Anyway, since I'm not sure I can trace this down, is there another way
> to set up timer events?
Yes (in components/add-ons) just take a look at: nsITimer.idl
Here's an example:
const Cc = Components.classes;
const Ci = Components.interfaces;
this.mTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
this.mTimer.init(this, refreshDelay, Ci.nsITimer.TYPE_ONE_SHOT);
observe: function(aSubject, aTopic, aData) {
case: "timer-callback"
...
break;
}
// or Ci.nsITimer.TYPE_REPEATING_SLACK or
Ci.nsITimer.TYPE_REPEATING_PRECISE
--
Michael Vincent van Rantwijk
- MultiZilla Project Team Lead
- XUL Boot Camp Staff member (ActiveState Training Partner)
- iPhone Application Developer
_______________________________________________
Project_owners mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/project_owners