Re: calculator example, Linking Actions and OGNL

Anakreon <[email protected]> Thu, 15 Apr 2004 14:15:54 +0300
Newsgroups gmane.comp.java.luxor-xul.user
Message-ID <[email protected]>
> 
> hmm... as I wrote you once, I think that better approach is using some
> scripting languge, like OGNL. then we don't need "strange-named
> methods", we just can use normal methods with parameters :
> 
> <button label="7" expression="buttonPressed(7)"/>
I agree with you about the strange-named methods, although this approach could 
also be used.
luxor supports scripting.It uses beanshell(it is kind of java) and probably 
python as well.
In order to use beanshell with luxor you should get the sources via cvs:
cvs -d:pserver:[email protected]:/cvsroot/luxor-xul luxor
Also download the latest version of luxilla.

I have sent two examples of beanshell usage.
The first is the calculator app, and the second is the SVG browser application 
developed by Batik which uses xul for the gui.
I don't know if those examples are available for download at this moment.
Ask Gerald about this.

Beanshell acts like a glue between the GUI generated by luxor and your classes.
You can also implement functionality completly in beanshell as done in the 
calculator app(but runs slower)

About xml:
You could provide an other implementation of luxor.core.XulLoader.
Perhaps there is an other easier way which I'm not aware of.



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click