Code

Better test
authorishmal <ishmal@users.sourceforge.net>
Wed, 12 Mar 2008 18:55:33 +0000 (18:55 +0000)
committerishmal <ishmal@users.sourceforge.net>
Wed, 12 Mar 2008 18:55:33 +0000 (18:55 +0000)
src/ui/dialog/scriptdialog.cpp

index ff075c1868da82da7d4992a4297423780f6667c5..7b299b700cdb9231e10eb8a1c9d4142c92fdb5e2 100644 (file)
@@ -115,8 +115,10 @@ static const char *defaultCodeStr =
     " * This is some example Javascript.\n"
     " * Try 'Execute Javascript'\n"
     " */\n"
+    "importPackage(javax.swing);\n"
     "function sayHello() {\n"
-    "  println('Hello, world!');\n"
+    "  JOptionPane.showMessageDialog(null, 'Hello, world!',\n"
+       "     'Welcome to Inkscape', JOptionPane.WARNING_MESSAGE);\n"
     "}\n"
     "\n"
     "sayHello();\n"