I am trying to find how the best way to handle the fact that my standalone will be used both on cellular and tablet screen size.
In fact, for a better user experience, some buttons and controls are sized differently, may be with different size icons, image etc.
First method
In the beginning, my method was to use 2 cards in the same stack:
1) "PhoneCard"
2) "TabletCard"
Most of the scripts, when possibile, where on the stack and I used a lot of behaviour for the controls inside the two cards.
In the preopenstack I decided wich one to use, according to the screenSize, putting their name in a global.
Code: Select all
put "PhoneCard" into gCurrentCard
Code: Select all
put "abc" into fld "TextField" of gCurrentCard
Second method:
- 1 card only
- 4/5 groups made in two sizes (for phone and tablet) and named differently, for example:
On Preopenstack I set a global and show/hide the needed groups:
Code: Select all
put "phone" into gMachine
Show group "ScoreGroupPhone"
Hide group "ScoreGroupTablet"
Code: Select all
Put "123" into field "Score" of group ("ScoreGroup" & gMachine)
The second method works fine, up to now, but the problem is the message path: if I forget to detail every control name (of the 4/5 groups) with a "...of group "ScoreGroupTablet", sometime the message is sent to the hidden group (if I am on phone and the message is sent to the Tablet hidden group).
This because, of course, controls inside the different size groups are named the same.
HOW to solve it:
A) Delete (in the preopenstack) the unwanted size groups:
This would work once the standalone is installed on the device, but it would be a problem on the developing environment
B) Find a way (in the preopenstack) to remove from the message path the unwanted size group.
Is this possible? And how?
Thanks and sorry for the long post
Trevix