Re: child wrappers
David Crawshaw <[email protected]> Wed, 9 Apr 2003 09:11:14 +1000
| Newsgroups | gmane.comp.java.xwt.general |
|---|---|
| Message-ID | <[email protected]> |
On Tuesday, April 8, 2003, at 09:03 PM, Adam Megacz wrote: > When you add a child to a box, it will trigger a template > application... but templates are only supposed to be applied in a > *background* thread. This means you can't add children to a box in > the foreground thread. That's not acceptable. If you add a box to a parent, is the prerender pipeline guaranteed to be executed before the next line of code? I always thought not, in which case: Have it check if it's in the foreground thread, and if so use a plain box as the wrapper and move the template application into a new background thread. Your only difficulty would be the _0 trap inside the template with the child wrapper redirect set. The only options are to either a) execute it with the possibility the wrapper template has not been applied, or b) move the _0 execution into the new background thread straight after the delayed apply. I can't find anything in the ref that promises the _0 trap gets called in the same thread. There would have to be extra temporary tracking records however, that would get a little messy. If the added box were removed in the same thread it was created in, you'd have to cancel the background thread. And then _0 would never be called. It's all a lot messier than it should be. d _______________________________________________ http://lists.xwt.org/listinfo/dev