(cc-ing laszlo-dev)

Hi Candide,

There are three different file extensions - .as, .js and .lzs.  All 
three are essentially Java/ECMAScript, but .as designates Actionscript 
for Flash, .js is JavaScript for the browser, and .lzs is Javascript 
with our own extensions (compiler pragmas, including #include and the like).

One of the design goals for Legals is to use as much common code as 
possible.  All runtime-specific code will be confined to the kernel - 
see the kernel directories for this.

If you do a build, you'll see how the files get combined into a 
runtime-specific version of the LFC.  You can check out the Library.lzs 
files to see runtime-specific includes, e.g.

if ($dhtml) {
...
} else {
...
}

There's a lot there, and we're working hard to get it in shape for Beta. 
      After looking a little closer, it seems like LzBrowser.loadJS() is 
in pretty good shape.

lzSetCanvasAttribute() currently lives in the javascript used to embed 
Flash applications in HTML - see $LPS_HOME/lps/includes/embed.js.  We'll 
need an implementation of this API for DHTML.  The current mechanism is 
pretty byzantine in Flash, but the end result of calling 
lzSetCanvasAttribute(name, value) is a call to 
LzHistory.receiveEvent(name, value).

If we could get this API working in JavaScript we should have all the 
ingredients for bidirectional communication - loadJS() can call out of 
an application, and lzSetCanvasAttribute(name, value) can call in by 
setting a canvas attribute and firing an event.

Let me know if you have questions as you look closer.  A few good first 
steps would be trying LzBrowser.loadJS() and LzText.setText() to see how 
well setting a text field to contain arbitrary HTML works.  Thanks!

Regards,
Max Carlson
OpenLaszlo.org


Candide Kemmler wrote:
> OK, I've just checked out the code. I see the LzBrowser.as and .js 
> indeed. Now they are the same at first sight. What kind of work is 
> expected here? I see lzs files all around also. What language are these 
> written in? Other question: there are surprisingly few .js files which 
> is strange given the already important support for dhtml. Where are they 
> hiding?
> 
> On 9/13/06, *Max Carlson* <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
> 
>     Hi Candide,
> 
>     Essentially, we plan to implement the LzBrowser.setCanvasAttribute() and
>     LzBrowser.loadJS() APIs in DHTML.  The work hasn't been done yet - we'd
>     love your help!  See $LPS_HOME/WEB-INF/lps/lfc/services/LzBrowser.as
>     and
>     .js for the respective Flash and browser Javascript versions.  You can
>     use ant in the lfc directory to rebuild all the lfc files, or the
>     buildlfc script to build just one.  For example, './buildlfc
>     --runtime=dhtml' will rebuild the LFC for just the DHTML
>     runtime.  After
>     rebuilding you should be able to refresh the browser to see your
>     changes.
> 
>     Let me know if you have any questions!
> 
>     Regards,
>     Max Carlson
>     OpenLaszlo.org
> 
>     Candide Kemmler wrote:
>      > Hi,
>      >
>      > I have a problem: I would like to develop a sophisticated blogging
>      > engine on top of laszlo. The thing is: there's no "real" text
>     editor for
>      > this platform. Even the "rich text" editor doesn't support images
>     (or
>      > smileys). Besides, editing text in flash has always been a chore
>     and I
>      > think it will always be.
>      >
>      > That's the reason why I recently got into the process of building
>      > legals. Now, making a "real" text editor from scratch is a complex
>      > endeavour in itself, and besides, that task has already been
>      > accomplished several times. My personal favourite is TinyMCE.
>      >
>      > I think it could well be impossible to neatly integrate OpenLaszlo
>      > legals with TinyMCE (correct me if I'm wrong), mostly because
>     TMCE uses
>      > an iframe to edit a document's contents. What I'd like to do is
>     let the
>      > browser handle things so that everything is transparent to the
>     end-user.
>      > Of course that implies that developers have a means to communicate
>      > between their laszlo apps and their DHTML javascript.
>      >
>      > I would really like to experiment a bit on this subject. I think
>      > OL/DHTML javascript communication is not ready yet. But it
>     shouldn't be
>      > too difficult to implement, or am I mistaken here?
>      >
>      > Anyway, I'd really appreciate a hint or two about the source
>     code, so I
>      > could figure out where to start...
>      >
>      > Cheers,
>      >
>      > Candide
>      >
>      > --
>      > Candide Kemmler
>      > 3 rue du Bailli - 1000 Bruxelles
>      > mobile:+32485067980
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      >
>      > _______________________________________________
>      > Laszlo-dev mailing list
>      > [email protected] <mailto:[email protected]>
>      > http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
> 
> 
> 
> 
> -- 
> Candide Kemmler
> 3 rue du Bailli - 1000 Bruxelles
> mobile:+32485067980

_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to