problem with tab panel

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: problem with tab panel

Post by Klaus » Mon Oct 04, 2010 8:32 pm

Hi pmc,
pmc wrote:Sorry, Klaus. I thought it was some kinda of script or code. I really do not understand the script.
set the menuhistory of btn 'Name' of cd "Name" to 1
when we said :
menuhistory of btn...
which btn are we talking about? Is it the Tab? Is the Tab also consider a btn in this case?
Thanks Klaus. Please do not get agitated by my stupidity.
Please lookup unknown terms like "menuhistory" in the docs (Rev Dictionary).

Yes a TAB panel, as you put it, IS in fact a button. I call it a tabbed button.

As I wrote earlier (what you obviously overlooked):
...
set the menuhistory of btn "your tabbed button here" of cd "Name of card with the tabbed button on it" to 1
...
Put this into the "mouseup" handler of the button that will navigate to card "Name of card with the tabbed button on it" and that's it :D


Best

Klaus

P.S.
Please do not copy/paste scripts from here without thinking or taking a deeper look!
We do not know your stacks, so we sometimes use "pseudo-code" like "... of cd X...", which should be obvious :wink:

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: problem with tab panel

Post by pmc » Mon Oct 04, 2010 9:16 pm

Thanks again Klaus. I did look at the menuHistory in the dictionary but still wouldn't understand. I will try again tomorrow. Still it isnt working.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: problem with tab panel

Post by Klaus » Mon Oct 04, 2010 10:20 pm

Hi pmc,

well, setting "the menuhistory" of a tabbed button is the same as if you clicked that TAB with the mouse!

Anyway, please post all of your scripts involved, we won't be able to help you otherwise.
And don't worry, we'll make it work, promised! :D


Best

Klaus

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: problem with tab panel

Post by pmc » Tue Oct 05, 2010 5:29 pm

Hi Klaus,
Thank you very much for your patience and understanding. Also your generous support and your assurance. It gives me tremendous faith in this product. This is the first time in my entire life in programming a software. I am drain out in thinking of the scripts.....need to rest. Will continue tomorrow with a fresh look at things. Thank you again.

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: problem with tab panel

Post by pmc » Wed Oct 06, 2010 3:09 pm

Hi

Attached is the script. It has errors. I think it is the way that I saved this files.
The cards does open but with error message and it opens with the previously closed tab, not the one that i want it to open.
Attachments
Capture3.GIF
Capture3.GIF (27.02 KiB) Viewed 6824 times
Capture2.GIF
Capture2.GIF (24.04 KiB) Viewed 6824 times
Capture1.GIF
Capture1.GIF (20.74 KiB) Viewed 6824 times

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: problem with tab panel

Post by pmc » Wed Oct 06, 2010 3:11 pm

'Capture2' is the script on the button but once the card opens, it is accompany by the 'Capture3' error message.

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Re: problem with tab panel

Post by Janschenkel » Wed Oct 06, 2010 3:18 pm

String in LiveCode have to be surrounded by double quotes (") not single quotes (') (a.k.a. apostrophes).
Try again with something along the lines of

Code: Select all

set the menuHistory of btn "Activity1" of cd "Activity" to 1
HTH,
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: problem with tab panel

Post by Klaus » Wed Oct 06, 2010 3:55 pm

Hi pmc,

1. Rev needs double quotes around names. Single quotes/apostrophes causes the error on Capture3.gif
2. You shouldn't write: go "name of card" nor open "Name of card" but instead go CD "Name" -> Capture1.gif and Capture2.gif
3. The message "opencard" is never sent to a button, so this makes no sense inside of a button -> Capture2.gig
Put this, if still necessary, intot he script of the card.

After you correct these things, all should be fine :)


Best

Klaus

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: problem with tab panel

Post by pmc » Wed Oct 06, 2010 4:04 pm

Ah yes, the "..." does prevent the error message from appearing but the tab isn't working, still. why?

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: problem with tab panel

Post by Klaus » Wed Oct 06, 2010 4:27 pm

Hi pmc,

hm, no idea so far?!

You can send me the stack if you like and I will take a deeper look!
klaus(AT)major-k.de


Best

Klaus

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: problem with tab panel

Post by pmc » Wed Oct 06, 2010 4:47 pm

Hi Klaus

This email ?: klaus(AT)major-k.de

pmc
Posts: 62
Joined: Thu Sep 23, 2010 3:14 am

Re: problem with tab panel

Post by pmc » Wed Oct 06, 2010 4:55 pm

Hi Klaus

Email send with attachements. Thanks

Post Reply