geraldo_ls | 5 Jul 15:51
Picon

(no code object) at line 0 with ScriptableThinlet and Jython

Hi,

I'm trying to use ScriptableThinlet with Jython.
I'm getting the following error:

SyntaxError: invalid syntax
: Traceback (innermost last):
  (no code object) at line 0
  File "<string>", line 1
        x=1
         ^
SyntaxError: invalid syntax

I've copied jython.jar to \lib directory .
Created CalculatorJython.xml with minimalist script (x=1)
Created run-calculator-python.bat using run-calculator-groovy.bat

I've played with line end characters without success (lf, cr+lf)

Any thoughts ?

Geraldo Lopes de Souza

CalculatorJython.xml
<panel>    
	<textfield name="number1" columns="4" />
	<label text="+" />
	<textfield name="number2" columns="4" />
	<button text="=">
        <script method="action">
(Continue reading)

Norbert Barbosa | 5 Jul 23:09
Picon
Favicon

Re: (no code object) at line 0 with ScriptableThinlet and Jython

Hello,
Yes, as said by Jonathan, it's jython integration contribution is
added on the futur 0.7 version. This version also add a more mozilla
XUL compliant syntax concerning script, like:
<panel>    
    <script type="text/beanshell" src="externalCalculatorBsh.bsh"/>
	<textfield name="number1" columns="4" />
	<label text="+" />
	<textfield name="number2" columns="4" />
	<button text="=" action='thinlet.setString(result, "text",
compute(number1, number2));'/>
	<textfield name="result" editable="false" />
</panel>

All developpement are ended, and I just need to finish some
documentation, so, I expect the scriptableThinlet 0,7 will be out in a
couple of day.

    --- Norbert Barbosa ---

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/thinlet/
(Continue reading)

Jonathan Moss | 5 Jul 17:46
Picon
Favicon

Re: (no code object) at line 0 with ScriptableThinlet and Jython

Geraldo,

This is known problem. From my invesitgations it seems the way that 
the Jython interpreter interacts with BSF is a little different to 
the other scripting languages it supports and therefore requires a 
small modification of the ScriptableThinlet class. I have passed on 
my findings and the fix to Norbert who will include them in the next 
release. Which hopefully won't be very long :)

regards,

Jon Moss
--- In thinlet <at> yahoogroups.com, "geraldo_ls" <geraldo_ls <at> c...> wrote:
> Hi,
> 
> I'm trying to use ScriptableThinlet with Jython.
> I'm getting the following error:
> 
> SyntaxError: invalid syntax
> : Traceback (innermost last):
>   (no code object) at line 0
>   File "<string>", line 1
>         x=1
>          ^
> SyntaxError: invalid syntax
> 
> I've copied jython.jar to \lib directory .
> Created CalculatorJython.xml with minimalist script (x=1)
> Created run-calculator-python.bat using run-calculator-groovy.bat
> 
(Continue reading)

geraldo_ls | 5 Jul 19:38
Picon

Re: (no code object) at line 0 with ScriptableThinlet and Jython


Thanks Jon, I'll be waiting for the fix in order to use Jython and
Thinlet..

Geraldo Lopes de Souza

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/thinlet/

<*> To unsubscribe from this group, send an email to:
    thinlet-unsubscribe <at> yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


Gmane