any suggestions on the following problem much appreciated. I am testing a gateway with some script called from inside a WML card with the 1.2 toolkit. If I use the form (I'm omitting the tag braces, the discussion post won't display them)
the function call fails (using the Nokia WAP Toolkit 1.2) with a WSException error executing Function($parameter1,$parameter2 - notice the missing parenthesis - returning "stack is empty".
However the form
go href="script.wmls#Function( $parameter1,$parameter2 )"
with the leading and trailing spaces in the call works fine. Also, a pure http request from the toolkit works either way. In fact, only the trailing space is required. Is this is a WML interpreter problem with length? In the first instance the space would be removed, but in the second it's the right parenthesis.
Ian Daly, Software Engineering
ANAM Wireless Internet Solutions
+353 1 661 7421
RE: Problem with gateway and WMLScript call
The problem is almost certainly down to bugs in the WML parser, not the WMLS Encoder (this object seems quite stable). You're probably right about it being 'a problem with length'.
I'm using the 1.3beta toolkit and the WML encoder does not parse the external WML Script references in a consistent manner. By way of illustration take a look at the following code snippet (angle braces removed):
card id=card1 title=Func Test newcontext=true
go href="script.wmls#foo( $(val1)this should not work,$(val2) )
Shouldn't work, right? But the WML parser does mind a bit! The WML is compiled and the function is called correctly. The only conclusion I can draw from this is that the parser is not formally correct. It should be a state machine, but it behaves like a stateless machine; perhaps Nokia should forward the code to the MIT Media Lab, they're very interested in stateless machines at the moment
Re: Problem with gateway and WMLScript call