Is there a trick for adding lets say logo and other such things to every screen without adding a controler to each screen you write?

Submitted by Terje Pedersen on 22 June 2011 at 10:39

On 22 June 2011 at 10:40 Terje Pedersen commented:

Not only a logo, that could have been managed by CSS, but also button() ie a custom control with more mobl stuff in


On 22 June 2011 at 10:47 Zef Hemel commented:

You could try something like this:

screen mainScreen() {
header(“Hello!”)
button(“Next”, onclick={
nextScreen();
})
}

screen nextScreen() {
header(“Yep”) {
backButton()
}
}

screen root() {
“Insert logo here”
screenContext {
“Loading…”
script {
async {
sleep(100);
mainScreen(animate=“none”);
}
}
}
}

The screenContext control defines what is the new “full screen”. Anything outside this area will remain unchanged, this is used with the tabSet control for instance. The root screen defines the general layout of the screen, the screenContext container is the part of the screen that changes (in this case, by quickly calling another screen, but you could also just put any controls you like there.


On 22 June 2011 at 11:00 Terje Pedersen commented:

Thanks :-) Works great :-)


On 8 July 2011 at 10:27 Zef Hemel closed this issue.

Log in to post comments