tiziano.fagni
09-28-2005, 06:45 AM
Hi developers,
I need some help to fix some runtime errors that occcurs during the execution of this simple program:
<canvas>
<class name="test" extends="window" visible="false" closeable="true" resizable="true"
width="600" height="500" >
<attribute name="operation" type="string" value="view" setter="setOperation(operation)"/>
<method name="setOperation" args="op">
if (op == "view")
{
this.setAttribute("title", "Something1");
this.ViewTab.Tabs.TabGeneral.setAttribute("enabled", false);
this.ViewTab.Tabs.TabOther.setAttribute("enabled", false);
}
else if (op == "modify")
{
this.setAttribute("title", Something2");
}
else
{
this.setAttribute("title", "Something3");
}
</method>
<view name="ViewTab" y="10" width="${immediateparent.width}" height="${immediateparent.height}">
<tabs name="Tabs" width="${immediateparent.width}" height="${immediateparent.height}">
<tabpane name="TabGeneral" text="General info" width="${immediateparent.width}" height="${immediateparent.height}">
<simplelayout axis="y" spacing="20" />
<view width="${immediateparent.width}">
<simplelayout axis="x" spacing="20"/>
<text>Something1:</text>
<edittext ></edittext>
<text>Something2:</text>
<edittext multiline="true" height="50"></edittext>
</view>
</tabpane>
<tabpane name="TabOther" text="Other informations" width="${immediateparent.width}" height="${immediateparent.height}">
</tabpane>
</tabs>
</view>
</class>
<test visible="true" operation="view"/>
</canvas>
When i run the application in debug mode, the debugger give me these errors:
test.lzx:19:reference to undefined property 'ViewTab'
test.lzx:19:undefined object does not have a property 'Tabs'
test.lzx:19:reference to undefined property 'Tabs'
test.lzx:19:undefined object does not have a property 'TabGeneral'
test.lzx:19:reference to undefined property 'TabGeneral'
test.lzx:19:undefined object does not have a property 'setAttribute'
test.lzx:20:reference to undefined property 'ViewTab'
test.lzx:20:undefined object does not have a property 'Tabs'
test.lzx:20:reference to undefined property 'Tabs'
test.lzx:20:undefined object does not have a property 'TabOther'
test.lzx:20:reference to undefined property 'TabOther'
test.lzx:20:undefined object does not have a property 's
Have you any idea why I can't access the declared view inside the class from within the class itself (the method 'setOperation')?
Thanks for your help.
Cheers Tiziano
I need some help to fix some runtime errors that occcurs during the execution of this simple program:
<canvas>
<class name="test" extends="window" visible="false" closeable="true" resizable="true"
width="600" height="500" >
<attribute name="operation" type="string" value="view" setter="setOperation(operation)"/>
<method name="setOperation" args="op">
if (op == "view")
{
this.setAttribute("title", "Something1");
this.ViewTab.Tabs.TabGeneral.setAttribute("enabled", false);
this.ViewTab.Tabs.TabOther.setAttribute("enabled", false);
}
else if (op == "modify")
{
this.setAttribute("title", Something2");
}
else
{
this.setAttribute("title", "Something3");
}
</method>
<view name="ViewTab" y="10" width="${immediateparent.width}" height="${immediateparent.height}">
<tabs name="Tabs" width="${immediateparent.width}" height="${immediateparent.height}">
<tabpane name="TabGeneral" text="General info" width="${immediateparent.width}" height="${immediateparent.height}">
<simplelayout axis="y" spacing="20" />
<view width="${immediateparent.width}">
<simplelayout axis="x" spacing="20"/>
<text>Something1:</text>
<edittext ></edittext>
<text>Something2:</text>
<edittext multiline="true" height="50"></edittext>
</view>
</tabpane>
<tabpane name="TabOther" text="Other informations" width="${immediateparent.width}" height="${immediateparent.height}">
</tabpane>
</tabs>
</view>
</class>
<test visible="true" operation="view"/>
</canvas>
When i run the application in debug mode, the debugger give me these errors:
test.lzx:19:reference to undefined property 'ViewTab'
test.lzx:19:undefined object does not have a property 'Tabs'
test.lzx:19:reference to undefined property 'Tabs'
test.lzx:19:undefined object does not have a property 'TabGeneral'
test.lzx:19:reference to undefined property 'TabGeneral'
test.lzx:19:undefined object does not have a property 'setAttribute'
test.lzx:20:reference to undefined property 'ViewTab'
test.lzx:20:undefined object does not have a property 'Tabs'
test.lzx:20:reference to undefined property 'Tabs'
test.lzx:20:undefined object does not have a property 'TabOther'
test.lzx:20:reference to undefined property 'TabOther'
test.lzx:20:undefined object does not have a property 's
Have you any idea why I can't access the declared view inside the class from within the class itself (the method 'setOperation')?
Thanks for your help.
Cheers Tiziano