-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add kees jsimport example... as an example :)
git-svn-id: https://pyjamas.svn.sourceforge.net/svnroot/pyjamas/trunk@1194 7a2bd370-bda8-463c-979e-2900ccfb811e
- Loading branch information
lkcl
committed
Aug 17, 2009
1 parent
fa7c052
commit 5cf14fa
Showing
6 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
# you will need to read the top level README, and run boostrap.py | ||
# and buildout in order to make pyjsbuild | ||
|
||
options="$*" | ||
#if [ -z $options ] ; then options="-O";fi | ||
../../bin/pyjsbuild --print-statements $options examplejs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
examplevar = 'Unaltered'; | ||
function get_examplevar( ) { | ||
return examplevar; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# WARNING: the use of javascript pretty much trashes all chance of using | ||
# pyjamas-desktop. give serious consideration to doing something OTHER | ||
# than including random bits of javascript off the internet in a pyjamas | ||
# application. the larger the random bit of javascript, the more chance | ||
# there is that it will interact in some horrendous way with the pyjamas | ||
# infrastructure. | ||
# | ||
# if you ABSOLUTELY MUST use javascript, here's how to do it. | ||
# | ||
|
||
from pyjamas import log | ||
|
||
# this simply tells the compiler that the two names are to be dropped | ||
# into the javascript global namespace | ||
from __javascript__ import examplevar, get_examplevar | ||
|
||
# the default behaviour of jsimport is to include the javascript file | ||
# "inline" - unmodified - direct into the compiler output | ||
from __pyjamas__ import jsimport | ||
|
||
jsimport("example.js") | ||
|
||
log.writebr(examplevar) | ||
examplevar = 'Altered' | ||
log.writebr( get_examplevar() ) | ||
|