[Laszlo-user] Causing something to be created asap

Robin Sheat robin at kallisti.net.nz
Sun Jul 15 22:08:43 PDT 2007


On Monday 16 July 2007 16:49:01 you wrote:
>  Putting a class at the 'top' of the canvas  
> means that it gets interpreted by the runtime before class  
> definitions it needs are interpreted and included to use.
It seems like that's not happening. Here's a contrived example:

<canvas>
...
<!-- this contains multiple sub-classes, for example 'widthcontroller' -->
<controllers name="controls" />

<somethingwindow height="${canvas.height}"
	width="${controls.widthcontroller.fullwidth ? canvas.width : canvas.width/2}"
	/>

</canvas>

In this case, I'll get an error when it tries to instantiate 'somethingwindow' 
saying that controls.widthcontroller is undefined, even if the controllers 
class header has 'initstage="immediate"'.

Note that it's quite happy for me to refer to 'controls', and if I move the 
widthcontroller thing from inside controllers to be instantiated by the 
canvas, it works fine. It's like it's not doing a depth-first-reverse thing, 
it's more like it's doing some kind of breadth-first search (which strikes me 
as strange, and it's probably not, but that's how it looks)

-- 
Robin <robin at kallisti.net.nz> JabberID: <eythian at jabber.kallisti.net.nz>

Hostes alienigeni me abduxerunt. Qui annus est?

PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8  7175 14D3 6485 A99C EB6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20070715/838ad4db/attachment.bin


More information about the Laszlo-user mailing list