> Do you go back out to the main event loop before processing the message
> queue?

Yes.  Here's how I'm doing it, in pseudo code:

Call Back Function{

Switch{
Case ROTATION_MSG:

DoRotation();
break;
}
}

DoRotation(){

//I've already aquired handles to dom elements after page load.
They're stored in globals

increment the angle
Set the attribute to this angle
Post ROTATION_MSG to the message cue

return;

}

I get a super hangy UI.  Should I be using a timer on a tiny
increment, or some other method?

> SetAttribute is of course synchronous.

Yeah, typo, sorry.  Meant Asynchronous.

> My real question is whether you go back out to the main event loop
> between SetAttribute calls?

I now I see what you mean, and hopefully the above shows that yes, I
am.

> Either one should work fine, really.

Sure.  Obviously I'd hate to have to work inside the JavaScript engine
when I could just be working in C++, but I don't understand the
hangyness.

Duncan
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to