On Thursday 12 July 2007 22:51:14 P T Withington wrote: > Note that in 4.x, handlers on the instance being constructed that > would be triggered due to setting initial values into the instance > are deferred until _all_ the initial values are set -- so the > handlers will not see a partially constructed instance. I'm using 3.3 (I tried writing the app for 4, but there was a bug I couldn't figure out (I think to do with the stretch attribute on view), and I'm under a time constraint. When I get this app finished and working in 3.3, I'll go back and try to reproduce it)
My issue is that I have handlers set that report back to the server when certain attributes change, and of course on initialisation, there is a flurry of events that I want to ignore (being the initial data setting). I was hoping that it would always be the case that attributes would be set, then isinited set, or at least that my oninit handler would be called, however it seems that neither of those are reliable. My current, very ugly, workaround is to simply count the number of events: if there are 4 attributes, ignore the first 4 events. Not nice, but it means that it works. (I have learnt an important lesson though, when writing your first significant Laszlo app, keep working until it becomes unmaintainable, and then start again using all the knowledge you picked up the first time around - my new one is about 2/3rds the size, faster, much more maintainable, has more features, and has taken me about three weeks (compared to a couple of months the first time around) :) -- Robin <[EMAIL PROTECTED]> JabberID: <[EMAIL PROTECTED]> Hostes alienigeni me abduxerunt. Qui annus est? PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D
pgp1cMOW1LH9m.pgp
Description: PGP signature
