On 2007-04-30, at 00:27 EDT, Henry Minsky wrote:

Two thoughts,

1) I  probably need to wrap parens around the whole thing, like in the
Firefox parser which otherwise interprets the braces as a block not a hash
table...

Indeed. It is complaining about the first colon it encounters. Although that should have been interpreted as a label -- so there is a bug in the parser. I think this is because Oliver added 'directive blocks' which seem not to be the same as a straight 'block'.

2) I may be getting faked out when I try to manually enter this in the
debugger, if the string size is so long that it exceeds some length limit on
a GET request...

Maybe, or it is being correctly compiled as a block in that case and blocks have no value. In the debugger try:

global.foo = { ... }

and see if `foo` is what you expect.

On 4/29/07, Henry Minsky <[EMAIL PROTECTED]> wrote:


I'm calling ScriptCompiler.compileToByteArray on this string, and getting a compiler error, Exception stack: org.openlaszlo.sc.parser.ParseException: Syntax error: the token ":" was not expected at this position at line 1,
column 14.

29 Apr 2007 21:49:49 (127.0.0.1 4) ERROR responders.Responder - Responding
with error SWF: Syntax error: the token ":" was not expected at this
position at line 1, column 14. : Exception stack:
org.openlaszlo.sc.parser.ParseException: Syntax error: the token ":" was
not expected at this position at line 1, column 14.
at org.openlaszlo.sc.parser.Parser.generateParseException (Parser.java
:8045)
    at org.openlaszlo.sc.parser.Parser.Sc(Parser.java:2597)
at org.openlaszlo.sc.parser.Parser.ExpressionStatement (Parser.java
:2580)
at org.openlaszlo.sc.parser.Parser.ToplevelStatement (Parser.java:2147)
    at org.openlaszlo.sc.parser.Parser.Directive(Parser.java:4140)
at org.openlaszlo.sc.parser.Parser.DirectiveBlock(Parser.java: 4248)
    at org.openlaszlo.sc.parser.Parser.Directive(Parser.java:4093)
    at org.openlaszlo.sc.parser.Parser.Program(Parser.java:4051)
    at org.openlaszlo.sc.Compiler$Parser.parse0(Compiler.java:455)
    at org.openlaszlo.sc.Compiler$Parser.parse(Compiler.java:471)
    at org.openlaszlo.sc.Compiler.compile (Compiler.java:330)
    at org.openlaszlo.sc.ScriptCompiler._compileToByteArray(
ScriptCompiler.java:109)
    at org.openlaszlo.sc.ScriptCompiler.compileToByteArray(
ScriptCompiler.java:194)
    at org.openlaszlo.data.swf.SOAPDataSource$SOAPData .<init>(
SOAPDataSource.java:591)


The string I am tryingto compile is an expression that builds a nested
hash table, shown below

{__LZstubload: true,stubinfo: {service:"ITempConverterservice", port:
"ITempConverterPort",wsdl: "
http://developerdays.com/cgi-bin/tempconverter.exe/wsdl/ ITempConverter",__LZctypes: {"int": {ns: " http://www.w3.org/2001/XMLSchema",type: "simple",typeQ:
null,members: null,base: null}}, __LZnamespace: "
http://www.borland.com/soapServices/"},stub: {FtoC: function () {var args
= arguments.callee.args;
return LzSOAPService.invoke(arguments[1],arguments[0],
args.superclass.requestheaders,{parts: [["temp",new QName ("int","http://www.w3.org/2001/XMLSchema ")]],opstyle: "rpc",operation: "FtoC",port: "ITempConverterPort",service: "ITempConverterservice",wsdl: "http://developerdays.com/cgi-bin/ tempconverter.exe/wsdl/ITempConverter "},args.superclass.secure,args.superclass.secureport);},CtoF: function ()
{var args = arguments.callee.args;
return LzSOAPService.invoke(arguments[1],arguments[0],
args.superclass.requestheaders,{parts: [["temp",new QName("int","
http://www.w3.org/2001/XMLSchema";)]],opstyle: "rpc",operation:
"CtoF",port: "ITempConverterPort",service: "ITempConverterservice",wsdl: " http://developerdays.com/cgi-bin/tempconverter.exe/wsdl/ ITempConverter"},
args.superclass.secure,args.superclass.secureport);}}}

If I wrap parens around the expression above, the compiler seems to
compile it, but doesn't seem happy with the result. If I paste this
expression above
into the swf laszo debugger, it doesn't return an object, just silently
fails..

Any idea what it might not be liking here?



--
Henry Minsky
Software Architect
[EMAIL PROTECTED]




--
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to