If you declare:

  <attribute name="asana" type="string" />

then the attribute values will automatically be interpreted as a string.  
Without that declaration, attribute values are interpreted as Javascript 
expressions, so:

  asana="Sleeping Swan"

becomes:

  var asana = Sleeping Swan;

and the compiler can't find the variables `Sleeping` or `Swan` and there is a 
missing operator.

On 2011-04-08, at 09:25, Terrence Brannon wrote:

> On Thu, Apr 7, 2011 at 7:30 PM, Chris Janik <[email protected]> wrote:
> 
>> You were misreferencing some things. It's loading now but nothing is being
>> displayed, you're not referencing an image with your url you're trying to
>> load a whole page.
>> 
> 
> that was definitely a mistake, but it is not what is causing the error. I
> fixed what you mentioned, but am getting the exact same error. I am confused
> about the "18:107" aspect of the error message:
> 
> ../../my-apps/yin-yoga-works/asanaview_class.lzx:18:107: Syntax error: the
> token "Swan" was not expected at this position.
> 
> I dont understand what the 107 refers to. I'm pretty sure 18 is line 18,
> but does 107 mean the 107th character?
> 
> Here is the modified source code:
> 
> <canvas>
> 
>  <class name="asanaview">
>    <attribute name="asana"/>
>    <attribute name="img"/>
> 
>    <view bgcolor="blue" width="300" height="200">
> 
>      <simplelayout axis="y" spacing="4"/>
> 
>      <text bgcolor="green">${this.name}</text>
>      <view width="${parent.width}" stretches="both"
> resource="${this.img}"/>
> 
>    </view>
> 
>  </class>
> 
>  <asanaview asana="Sleeping Swan" img="
> http://www.yinyoga.com/images/asana_swan_sleeping.gif"; />
> 
> </canvas>


Reply via email to