Luxor XUL Example Suite for Groovy Scripting Language Upcoming

Gerald Bauer <[email protected]> Wed, 28 Jan 2004 07:35:38 -0800 (PST)
Newsgroups gmane.comp.java.luxor-xul.user
Message-ID <[email protected]>
Hello,

  If you haven't followed the news about scripting
languages for the Java runtime, there's a new free,
open-source scripting language upcoming that combines
the best of Python, Ruby and Smalltalk and uses a
Java-like syntax.

  If you haven't heard about it, the all-in-one world
wonder is called Groovy and resides online @
http://groovy.codehaus.org

  Although Groovy is still in Beta and not even a year
old Groovy is already the second most popular
scripting language for Java behind Python (Jython).
(Source:
http://viva.sourceforge.net/republic/2004/01/scripting_language_of_the_year_2003_award_and_the_winner_is.html
)

  To try out Groovy I've decided to "port" the Python
(Jython) Luxor example suite to Groovy. If you're
curious what Groovy in action looks like, please check
out the Luxor startup code for the window example in
the appendix.

  If anyone is already using Luxor with Groovy, please
let me know as I'm currently stuck with some weird
code generation errors such as Exception in thread
"main" java.lang.VerifyError: (class: AppFrame,
method: onDecCounter signature: ()Ljava/lang/Object;)
Unable to pop operand off an empty stack     
      
  Let me know if anyone is interested in scripting
Luxor in Groovy and I will post more details about the
upcoming example suite and what is holding it back.

     - Gerald

Appendix:
----------------------------------------

import java.io.File

import luxor.XulManager
import luxor.core.loader.ChromeFileResourceLoader

import houston.Status
import houston.StatusConsole


class AppRunner
{   
   AppRunner()
   {
      xul = XulManager.getXulManager()

      xul.setResourceLoader( new
ChromeFileResourceLoader( 
            new File(
"c:/src/groovy/luxor/window/chrome" ) ) )

      # load everything in chrome's startup directory
tree
      xul.load()

      frame = xul.lookupWindow( "MAIN" )
      frame.show()
   }  

   static void main( args )
   {
     # make sure we don't miss any errors, warnings,
hints.
     Status.addListener( new StatusConsole() )
 
     new AppRunner()
   }
} 


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn