Tab Panel with visual effect - inconsistent?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 73
- Joined: Sun Jun 17, 2007 12:08 am
- Location: Montréal, Canada
Tab Panel with visual effect - inconsistent?
Hi all.
I created a Tab Panel with five tabs: "Tab 1", "Tab 2",..., "Tab 5".
I also created five fields, with the same names.
I added a script to the tab panel to show the field with the same name as the tab and to hide the other four fields.
Works fine.
Then, I wanted to "experiment" with visual effects.
In the part of the script that relates to "Tab 2", in the statement that shows "Field 2", I added "with visual effect checkerboard slow". Cute, eh?
Here's the problem (and my question): If I click on "Tab 1", which shows "Field 1", then on "Tab 2", "Field 2" is shown, with the visual effect. Spectacular!
HOWEVER, if before clicking on "Tab 2", I first click on "Tab 3" or "Tab 4" or "Tab 5", "Field 2" is shown, but WITHOUT the visual effect!!!
My question: How come???
(NOTE: I probably created the five fields in the sequence 1, 2, 3, 4, 5. So the fields are probably layered in that sequence. Could this have anything to do with this behaviour???)
Thanks.
I created a Tab Panel with five tabs: "Tab 1", "Tab 2",..., "Tab 5".
I also created five fields, with the same names.
I added a script to the tab panel to show the field with the same name as the tab and to hide the other four fields.
Works fine.
Then, I wanted to "experiment" with visual effects.
In the part of the script that relates to "Tab 2", in the statement that shows "Field 2", I added "with visual effect checkerboard slow". Cute, eh?
Here's the problem (and my question): If I click on "Tab 1", which shows "Field 1", then on "Tab 2", "Field 2" is shown, with the visual effect. Spectacular!
HOWEVER, if before clicking on "Tab 2", I first click on "Tab 3" or "Tab 4" or "Tab 5", "Field 2" is shown, but WITHOUT the visual effect!!!
My question: How come???
(NOTE: I probably created the five fields in the sequence 1, 2, 3, 4, 5. So the fields are probably layered in that sequence. Could this have anything to do with this behaviour???)
Thanks.
Michel
Montréal, Canada
Montréal, Canada
Re: Tab Panel with visual effect - inconsistent?
Bonjour Michel,
please post the script of your TAB panel!
Best
Klaus
please post the script of your TAB panel!
That's great, a clever naming convention is half the rent!I created a Tab Panel with five tabs: "Tab 1", "Tab 2",..., "Tab 5".
I also created five fields, with the same names.
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Tab Panel with visual effect - inconsistent?
Hi.
Anything to get out of doing my day job.
So I made a tab panel with five tabs as you said, and five fields with names as you said. I did this in the tab panel script:
Everything works fine, regardless of the tab I click on. LC 8.1.9.
By the way, "checkerboard" does not look good for the small fields I made. I tried "barn door" and it was much smoother.
Craig Newman
Anything to get out of doing my day job.
So I made a tab panel with five tabs as you said, and five fields with names as you said. I did this in the tab panel script:
Code: Select all
on menuPick tItemName
repeat with y = 1 to 5
hide fld ("tab" && y)
end repeat
show fld tItemName with visual effect checkerboard slow
end menuPick
By the way, "checkerboard" does not look good for the small fields I made. I tried "barn door" and it was much smoother.
Craig Newman
Re: Tab Panel with visual effect - inconsistent?
Hi all,
"menupick" comes with TWO parameters, see below how to use it!
Best
Klaus
"menupick" comes with TWO parameters, see below how to use it!
Code: Select all
on menuPick tClickedTab, tPreviousTab
## Set speed of visual VERY SLOW effect!
## Yep, strange, but it only controls the VERY SLOW effect :-D
set the effectrate to 500
## (not so) new and HIGHLY recommended syntax!
lock screen for visual effect
## This IS cool!
hide fld tPreviousTab
show fld tClickedTab
unlock screen with visual effect dissolve very slow
end menuPick
Klaus
-
- Livecode Opensource Backer
- Posts: 73
- Joined: Sun Jun 17, 2007 12:08 am
- Location: Montréal, Canada
Re: Tab Panel with visual effect - inconsistent?
Hi Dunbarx and Klaus. Thanks for your replies. Like Klaus said, in another thread, there are many ways to skin a cat!
My script is much less elegant, but here it is: (BTW I had not really named the tabs and the fields as I stated in my original post, for clarity's sake )
Thanks for your comments.
My script is much less elegant, but here it is: (BTW I had not really named the tabs and the fields as I stated in my original post, for clarity's sake )
Code: Select all
on menuPick pItemName
switch pItemName
case "Technique"
show field "Technique"
hide field "Utiliser"
hide field "Historique"
hide field "Suggestions"
hide field "Glossaire"
break
case "Comment utiliser"
hide field "Technique"
show field "Utiliser" with visual effect checkerboard slow
hide field "Historique"
hide field "Suggestions"
hide field "Glossaire"
break
case "Historique"
hide field "Technique"
hide field "Utiliser"
show field "Historique"
hide field "Suggestions"
hide field "Glossaire"
break
case "Suggestions"
hide field "Technique"
hide field "Utiliser"
hide field "Historique"
show field "Suggestions"
hide field "Glossaire"
break
case "Glossaire"
hide field "Technique"
hide field "Utiliser"
hide field "Historique"
hide field "Suggestions"
show field "Glossaire"
end switch
end menuPick
Michel
Montréal, Canada
Montréal, Canada
Re: Tab Panel with visual effect - inconsistent?
Please get used to the VISUAL EFFECT syntax I wrote above!
The dictionary is out of date, using the old syntax can even crash an iOS app!
The dictionary is out of date, using the old syntax can even crash an iOS app!
-
- Livecode Opensource Backer
- Posts: 73
- Joined: Sun Jun 17, 2007 12:08 am
- Location: Montréal, Canada
Re: Tab Panel with visual effect - inconsistent?
Thank you Klaus. I will, I will.Please get used to the VISUAL EFFECT syntax I wrote above!
This is distressing! If, as a newbie, I cannot rely on the Dictionary, what should I use as a reference?The dictionary is out of date
Michel
Montréal, Canada
Montréal, Canada
Re: Tab Panel with visual effect - inconsistent?
Don't worry, the entry in teh dictionary for "visual effect" is the only one I know that is a bit out-of-date!