I'm working on some skinnable-app stuff, and I'd like to change resources
willy-nilly at runtime. This doesn't seem to quite work, though I'm
having pretty good luck if I do things like this:
target.setResource(rsc);
if (stretches) {
target.setAttribute('stretches', stretches);
} else {
target.setWidth(target.resourcewidth);
target.setHeight(target.resourceheight);
}
But what I *really* want to do is something like this:
<resource name="r1" src="1.swf"/>
<resource name="r2" src="2.swf"/>
<class name="skindef">
<attribute name="btnrsc" type="string"/>
</class>
<skindef name="skin1" brnrsc="r1"/>
<skindef name="skin2" brnrsc="r2"/>
<attribute name="curskin" value="$once{skin1}"/>
...
<view name="v1" resource="${curskin.btnrsc}"
...
<method name="switchskin">
canvas.setAttribute('curskin', canvas.skin2);
// resources magically change!
</method>
Right now when I do this, nothing happens - no warning, but no resource
change either. How far is the platform from supporting something like this?
gse
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev