/[snow]/trunk/docs/tutorial.html
ViewVC logotype

Diff of /trunk/docs/tutorial.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 14 by astalla, Wed Nov 4 22:33:00 2009 UTC revision 19 by astalla, Thu Nov 19 23:05:35 2009 UTC
# Line 150  Events happen on a dedicated thread (in Line 150  Events happen on a dedicated thread (in
150  Snow can easily be embedded in a Java application by using JSR-223. The snow.Snow class has some static methods that can be used to load some Snow source code from a .lisp file (or classpath resource), or to obtain an instance of <code>javax.script.ScriptEngine</code> which you can use for more advanced stuff (e.g. compiling Lisp code, or calling specific Lisp functions). When embedding Snow to define (part of) the application's GUI, it is recommended that you modularize the Snow code in functions, which you'll call from Java to obtain the GUI components:  Snow can easily be embedded in a Java application by using JSR-223. The snow.Snow class has some static methods that can be used to load some Snow source code from a .lisp file (or classpath resource), or to obtain an instance of <code>javax.script.ScriptEngine</code> which you can use for more advanced stuff (e.g. compiling Lisp code, or calling specific Lisp functions). When embedding Snow to define (part of) the application's GUI, it is recommended that you modularize the Snow code in functions, which you'll call from Java to obtain the GUI components:
151  <h4><code>file.lisp</code></h4>  <h4><code>file.lisp</code></h4>
152  <pre class="paste-area">  <pre class="paste-area">
153    (in-package :snow-user)
154    
155  (defun create-main-frame (&rest args)  (defun create-main-frame (&rest args)
156    ...snow code...)    ...snow code...)
157  </pre>  </pre>

Legend:
Removed from v.14  
changed lines
  Added in v.19

  ViewVC Help
Powered by ViewVC 1.1.5