PDA

View Full Version : application design


sandman
02-19-2003, 07:32 PM
When creating an application with multiple screens is it better to create each screen as a separate .lzx file or should all the screens be defined within the same .lzx but made visible/invisible based on user events. Looking at the weather app it seems that the change in screen is achieved by making views visible/invisible.

antun
02-19-2003, 08:37 PM
Definately turn visibility on and off. Feel free to use multiple LZX files to organize your code however - you can define classes in one LZX file, and instantiate them in another.

-Antun

arina
12-08-2004, 07:15 AM
Hello, Antun!

Is there more compact way to switch the visibility of the components than this one:


<method name="content" args="click">
switch(click){
case "advanced":
this.advanced.setVisible(true);
with(this){
tips.setVisible(false);
letter.setVisible(false);
result.setVisible(false);
}
parent.subviews[0].subviews[2].setVisible(false);
break;
case "tips":
this.tips.setVisible(true);
with(this){
advanced.setVisible(false);
letter.setVisible(false);
result.setVisible(false);
}
parent.subviews[0].subviews[2].setVisible(true);
break;
...
default:
this.result.setVisible(true);
with(this){
tips.setVisible(false);
letter.setVisible(false);
advanced.setVisible(false);
} parent.subviews[0].subviews[2].setVisible(true);
break;
}
</method>


Thank you in advance

Arina

antun
12-08-2004, 10:13 AM
Take a look at the basetabs, basetabsbar and basetabscontent base classes; you can use them to create a tabbed interface without worrying about all the logic for showing and hiding the contents.

-Antun

arina
12-09-2004, 01:10 AM
Thank you Antun for your advise. But the design of our app is predefined by customer. Is it possible to hide tabs and to operate with them even if visibility = false?