Is this a solo app? If you know the resources at compile time, you
could write a little script to transform your dataset description
from arbitrary xml to lzx resource descriptions. Depending on how
much automation you need, an ant task could invoke the script.
Say you've got your dataset specified like this in mydataset.xml
<images>
<myniceimage file="foo/bar/nicey.jpg" />
...
</images>
Then do something like this:
sed -e "s/myniceimage/resource name=\"myresource\"/" -e s/file/
source/ < mydataset.xml > mydataset.lzx
That would get the resources compiled in; a bit more regexp magic
would give the resources unique names.
-ben
On Mar 16, 2006, at 8:24 AM, Michael Gregor wrote:
>
> How would one load resources based on information in a dataset?
>
> or in other words.
>
> I have a set of 6 jpegs which are specified in an XML document. I
> want
> to have those jpegs included as resources in my app at compile time.
> I want the src attribute of a <resource> tag to be programatically
> specified. Is this possible? If not, what is the best way to
> 'preload'
> these jpegs so that the app has access to them on the client upon
> startup?
>
> thanks,
>
> MG
>
> _______________________________________________
> Laszlo-user mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
benjamin shine
software engineer
[EMAIL PROTECTED]
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user