Mobile Apps: SubStacks vs. Cards for Tabs
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 216
- Joined: Wed Feb 27, 2013 9:04 pm
Mobile Apps: SubStacks vs. Cards for Tabs
Hi there,
the most Apps (such as WhatsApp) have a TabBar.
So I'm using mobGUI to handle the different screen-resolutions and get the look of the OS's.
My question is: Should I build a SubStack or a Card for every Tab in my TabBar? What would be the difference?
the most Apps (such as WhatsApp) have a TabBar.
So I'm using mobGUI to handle the different screen-resolutions and get the look of the OS's.
My question is: Should I build a SubStack or a Card for every Tab in my TabBar? What would be the difference?
-
- Posts: 44
- Joined: Thu Jul 19, 2012 1:49 pm
Re: Mobile Apps: SubStacks vs. Cards for Tabs
Hi DevBoyLars
For the most part there wouldn't be a difference, I haven't used mobGUI myself, but we are developing for mobile, stacks and cards look the same on mobile, the only difference would be that using substacks you could swap tabs in and out more easily by removing the stack or adding in a new stack, whereas can't be moved around like that.
Using substacks would also give you an extra layer in the message path
To simplify, for the most part and from a display point of view I can't see any difference, so it's up to your personal preference.
Hope this helps
David
For the most part there wouldn't be a difference, I haven't used mobGUI myself, but we are developing for mobile, stacks and cards look the same on mobile, the only difference would be that using substacks you could swap tabs in and out more easily by removing the stack or adding in a new stack, whereas can't be moved around like that.
Using substacks would also give you an extra layer in the message path
To simplify, for the most part and from a display point of view I can't see any difference, so it's up to your personal preference.
Hope this helps
David
-
- Posts: 216
- Joined: Wed Feb 27, 2013 9:04 pm
Re: Mobile Apps: SubStacks vs. Cards for Tabs
OMG David!!!! You saved my a..s 
Substacks solved my big problem with mobGUI now (I used cards instead of substacks, for every tab, before and if the user switched between these cards, he could see how mobGUI reconstructed the screen to the devices screen-resolution). Now I I'm using a substack for every tab it works perfect!!! I'm sooo glad
But I still don't understand why it works with a substack, but now with cards (it confused me, because a substack got a card too)
This works:
--MainStack
--Card (first tab the user sees)
--Substack1
---Substack1_card
--Substack2
---Substack2_card
This not:
--MainStack
--Card1
--Card2

Substacks solved my big problem with mobGUI now (I used cards instead of substacks, for every tab, before and if the user switched between these cards, he could see how mobGUI reconstructed the screen to the devices screen-resolution). Now I I'm using a substack for every tab it works perfect!!! I'm sooo glad

But I still don't understand why it works with a substack, but now with cards (it confused me, because a substack got a card too)
This works:
--MainStack
--Card (first tab the user sees)
--Substack1
---Substack1_card
--Substack2
---Substack2_card
This not:
--MainStack
--Card1
--Card2
-
- Livecode Opensource Backer
- Posts: 328
- Joined: Mon Dec 05, 2011 5:34 pm
- Contact:
Re: Mobile Apps: SubStacks vs. Cards for Tabs
Think of Stacks as the Window Frame and the Cards as the Window Contents. You can change the contents inside a frame, or you can completely replace the frame (stack) - but it would still need content (card). It's a simplified analogy, but probably the easiest to think about.
Also you cant add a button to a stack directly - only to a card.
That's why the substacks have cards.
Hope that helps,
Dave
Also you cant add a button to a stack directly - only to a card.
That's why the substacks have cards.
Hope that helps,
Dave
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.
Visit http://electronic-apps.info for released App information.
-
- Posts: 216
- Joined: Wed Feb 27, 2013 9:04 pm
Re: Mobile Apps: SubStacks vs. Cards for Tabs
DevBoyLars...
It might be better to use groups within the tab structure... ie when you click on tab 1 ... show group 1 and hide the other groups... then everything is on one card. .. I mention it because that is the method I usually emply when having to use tabs...
Dixie
It might be better to use groups within the tab structure... ie when you click on tab 1 ... show group 1 and hide the other groups... then everything is on one card. .. I mention it because that is the method I usually emply when having to use tabs...
Dixie
-
- Posts: 216
- Joined: Wed Feb 27, 2013 9:04 pm
Re: Mobile Apps: SubStacks vs. Cards for Tabs
So you put everything on one card and only show the appropriate group for the selected tab?
Why this could be better than a substack for every tab?
Why this could be better than a substack for every tab?
Re: Mobile Apps: SubStacks vs. Cards for Tabs
DevBoyLars...
I have attached a 'very simple' stacks that uses groups in 'tabs', as it were...
I think that for me it is easier to manage groups than have different substacks and cards all over the place...
I am not saying that this is the 'definitive' way to go about using tabs... it is down to your personal preference...
Dixie
I have attached a 'very simple' stacks that uses groups in 'tabs', as it were...
I think that for me it is easier to manage groups than have different substacks and cards all over the place...

Dixie
- Attachments
-
- groupsInTabs.zip
- (1.53 KiB) Downloaded 323 times
Re: Mobile Apps: SubStacks vs. Cards for Tabs
Lots of reasons, the main one being code maintenance. In general, you only want one copy of a script or handler for any particular action. Substacks will require duplication of code or objects in most cases; at the very least you'll need duplicates of the tab button itself. It becomes a nightmare to keep all the scripts and objects in synch.DevBoyLars wrote:So you put everything on one card and only show the appropriate group for the selected tab?
Why this could be better than a substack for every tab?
Another reason to avoid substacks for tab use is the flash you get when you switch windows. You can "go to stack x in this window" to overcome that, but it's still overhead.
The usual way to manage a tab button is by showing/hiding groups, or by going to different cards that share the same tab button as a background group. I don't use MobGUI but in general, if you are seeing objects redrawn when you go to a new card, you need to put all the scripts into a preOpenCard handler. If you've already done that, then lock the screen when you close the previous card. If MobGUI is interfering with the screen redraws, then I suggest using the show/hide groups method. You'll save yourself a lot of headaches down the road.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 216
- Joined: Wed Feb 27, 2013 9:04 pm
Re: Mobile Apps: SubStacks vs. Cards for Tabs
Thank you, that helps me to understand it much betterDixie wrote:DevBoyLars...
I have attached a 'very simple' stacks that uses groups in 'tabs', as it were...
I think that for me it is easier to manage groups than have different substacks and cards all over the place...I am not saying that this is the 'definitive' way to go about using tabs... it is down to your personal preference...
Dixie

Why do you "lock screen" on start? What does it do?
-
- Posts: 216
- Joined: Wed Feb 27, 2013 9:04 pm
Re: Mobile Apps: SubStacks vs. Cards for Tabs
Could it be, that it is a little bit slower (App start, just about 1 second on my iPhone 5) to use all tabs on one card, instead substacks for each tab?
Maybe, because the App doesn't have to load all graphics at start, if it uses substacks?
Maybe, because the App doesn't have to load all graphics at start, if it uses substacks?
-
- Posts: 216
- Joined: Wed Feb 27, 2013 9:04 pm
Re: Mobile Apps: SubStacks vs. Cards for Tabs
It's true: I tested it!
Same App, same features, same graphics - everything exactly the same, but one with one card and groups and one with substacks for every tab:
Start-Time on iPhone 5:
Groups: 2,4
Substacks: 1,3s
That's much in my opinion!
Any idea, why it needs over 1 second more with groups? -.-
Same App, same features, same graphics - everything exactly the same, but one with one card and groups and one with substacks for every tab:
Start-Time on iPhone 5:
Groups: 2,4
Substacks: 1,3s
That's much in my opinion!
Any idea, why it needs over 1 second more with groups? -.-