View Full Version : laszlo equiv of body onload?
whisperstorm
10-08-2003, 02:17 PM
I want to execute some code after all the data has loaded and everything's ready to go. If I were in HTML I'd have an onload handler on the body tag, what is the equiv for a laszlo app? ininit on canvas?
antun
10-08-2003, 03:22 PM
Not quite - oninit on canvas will fire after all the views are in place (but before any initstage="late" views have finished initing).
Data requests are completely asynchronous. The only way to find when they come back in is to create <datapointers> into the canvas that point into the datasets that you want to wait for. Then put a method that's tied to the ondata event into each of those datapointers, and have them register with some global variable, and check if they're the last one to be returned.
-Antun
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.