I do have a question about TabBars. I have an app design in which here are several different tab bars for different parts of the app.
I went through the video, and saw how one was setup as a "background" so that it was shared on all cards, but what's the recommended approach when you have a few tab bars, and each are shared across a few cards in a section of the app (say, Doctors, Patients, and Cases all have their own tab bars for sections relating to these entities)?
I created a tabBar and marked it as Shared Group, but not Background, and it mostly works except that I have pasted the group (tab bar and buttons) into 3 cards, and the "selected" button isn't being properly persisted from card to card. (They're either not sharing state, or I'm jumping out of the event flow before the touched button's changing its highlight).
The shared message handler for the touch evens on the grow is like this (for a set of cards relating to "Doctors", for example):
Code: Select all
on touchStart
local destinationCard
if (the uTabText of me) is "Home" then
put "Home" into destinationCard
else
put ("Doctor." & the uTabText of me) into destinationCard
end if
if the name of this card is not destinationCard then
lock screen for visual effect
go to card destinationCard
wait for 0 millisecs with messages
unlock screen
end if
end touchStart