Re: Dynamic call to the compiler
P T Withington <ptw <at> openlaszlo.org>
2006-06-02 13:59:30 GMT
It sounds to me like you want to write a new servlet. Have a look at:
WEB-INF/lps/server/src/org/openlaszlo/servlets/
or the responders subdirectory.
Also, read about deployment (fetch your app with ?lzt=deployment) to
see how you can embed an OpenLaszlo app in an HTML page. If you use
the <object> tag, you can provide alternate implementations as the
body of the object tag and browsers that do not have Flash will
automatically fall back to the [alternate](http://www.w3.org/TR/html4/
struct/objects.html#h-13.3).
Finally, [SWFObject](http://blog.deconcept.com/swfobject/) has also
been used to embed OpenLaszlo apps.
On 2006-06-02, at 07:29 EDT, jean-baptiste.briaud <at> uk.bnpparibas.com
wrote:
> Hi the list,
>
> I would like to call the laszlo compiler dynamically using stream
> rather
> than statically using files.
> Is it possible ?
>
> I already started to look at the source code but it is quite huge
> and I'm
> lost.
> I found a compiler package and a Compiler class but I'm not sure
> about how
> to use it.
> I also found how it is used by the Main.main (from the lzc script)
> but it
> is still unclear to me if I will be able to call it dynamically (even
> without the stream).
> At the end, the compilation process seem to be a XSLT
> transformation. Is
> it that ? Or are there other steps required to compile a lzx into a
> swf ?
> (is swf an xml stream too ?? Sorry, I'm really new to flash).
> It look like there is a complex process to include other files (the
> component)... but I'm not sure at all...
>
> Basically, I would like a Servlet to call sometime that compiler and
> return a swf stream (to show flash thing on screen) and sometime to do
> other things like returning simple html from another stream for
> example
> (could be a way to add smoothly flash to an existing apps, so some
> parts
> will be laszlo, some others will keep the old code, the servlet would
> decide).
>
> Thanks for your help !
>
> (that was my first post, I did it !)
>
>
> This message and any attachments (the "message") is
> intended solely for the addressees and is confidential.
> If you receive this message in error, please delete it and
> immediately notify the sender. Any use not in accord with
> its purpose, any dissemination or disclosure, either whole
> or partial, is prohibited except formal approval. The internet
> can not guarantee the integrity of this message.
> BNP PARIBAS (and its subsidiaries) shall (will) not
> therefore be liable for the message if modified.
>
> **********************************************************************
> ************************
>
> BNP Paribas Private Bank London Branch is authorised
> by CECEI & AMF and is regulated by the Financial Services
> Authority for the conduct of its investment business in
> the United Kingdom.
>
> BNP Paribas Securities Services London Branch is authorised
> by CECEI & AMF and is regulated by the Financial Services
> Authority for the conduct of its investment business in
> the United Kingdom.
>
> BNP Paribas Fund Services UK Limited is authorised and
> regulated by the Financial Services Authority
>
> _______________________________________________
> Laszlo-dev mailing list
> Laszlo-dev <at> openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev