Tab Panel goes rastafari

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
danielrr
Posts: 142
Joined: Mon Mar 04, 2013 4:03 pm

Tab Panel goes rastafari

Post by danielrr » Sun Jun 09, 2013 2:53 pm

Hi,

I have a tab panel I use for one of the things tab panels are supposed to be used (showing and hiding different sets of buttons and fields) So far so good. My problem is that whenever I push a cascade menu buttom that's placed inside that panel, my tab panels turns dark blue, and it never returns to its former colour. This happens after the menuPick function in the cascade menu button has been executed, but nothing inside this function or any other function refers to any action upon the tab panel. Besides, I can't change the colour of the panel (this due only to my ignorance, I know) since it doesn't seem to depend upon any of the parameters I can adjust from the graphic effects, blending or colours and patterns tabs in the object inspector. Any idea of what can be happening?

thanks,

Daniel

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Tab Panel goes rastafari

Post by Mark » Sun Jun 09, 2013 2:56 pm

Hi Daniel,

Please report the version of LC you are using, your operating system + version, and any relevant scripts.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

danielrr
Posts: 142
Joined: Mon Mar 04, 2013 4:03 pm

Re: Tab Panel goes rastafari

Post by danielrr » Sun Jun 09, 2013 3:36 pm

Sure: I'm using LC 5.5.1 on a 2Gz Intel core i7 iMac OSX 10.7.5. I am attaching a tiny video for you to see the problem. The script that's executing at the time of the surprising colour change is very simple

on menuPick clas
get "i"&line 3 of cd fld "tipoActual"
set itemdelimiter to "|"
put last item of clas into clas
set itemdelimiter to "|"
put "Semantica 21" into ncampo
repeat with x = 1 to 21
if hilite of btn ("SemanticaLema"&x) = false
then
put ("Semantica "&x) into nCampo
exit repeat
end if
end repeat
if clas <> ""
then
put fld "clavesSemantica" into clavesSemantica
MarcaSufijos clas,ncampo,the shiftkey = "down",esNeg
end if
set hilite of cd btn ncampo to false
end menuPick

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Tab Panel goes rastafari

Post by Mark » Sun Jun 09, 2013 3:52 pm

Daniel,

Currently, I'm using 10.6.8 with LC 6.0.1. I don't see the problem you describe when I test your script. Perhaps someone else can confirm what you see. Are you sure that you posted all relevant information? What happens if you try this in an otherwise empty stack?

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

danielrr
Posts: 142
Joined: Mon Mar 04, 2013 4:03 pm

Re: Tab Panel goes rastafari

Post by danielrr » Sun Jun 09, 2013 4:23 pm

If I place the same cascade button on a empty card (and change the script to point the script to the fields in the original card) what happens is that it is the cascade button that turns blue!

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

Re: Tab Panel goes rastafari

Post by Klaus » Sun Jun 09, 2013 4:49 pm

Hi Daniel,

sounds like that "cascade" button is auto hiliting, and the default color is this dark blue.

You can try to: set the autoarm of btn "your cascade button here" to FALSE
in the message box, since this property cannot be set via the Inspector!

But just guessing... :-)


Best

Klaus

danielrr
Posts: 142
Joined: Mon Mar 04, 2013 4:03 pm

Re: Tab Panel goes rastafari

Post by danielrr » Sun Jun 09, 2013 5:10 pm

Looks like we have a bingo right over there.

OK, If i set the autoarm if my cascade button to false, then it doesn't turn blue out of the apparent blue.
AND, if I set the hilitefill if my tab panel to false, then this problem is solved. Thanks! :)

What I still don't understand is why the tab panel was hilited when I pushed the cascade button.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Tab Panel goes rastafari

Post by Mark » Sun Jun 09, 2013 5:12 pm

Hi Klaus,

I think you mean the autoHilite. The autoArm would open the menu automatically when the mouse hovers over it.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

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

Re: Tab Panel goes rastafari

Post by Klaus » Sun Jun 09, 2013 5:18 pm

Hi Mark,

no, I really meant autoarm***, and this obviously solved his problem :-)
*** The autohilite of "cascade" buttons IS in fact false by default!


Best

Klaus

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Tab Panel goes rastafari

Post by Mark » Sun Jun 09, 2013 5:33 pm

Hi Klaus,

Apparently, I wrote my reply simultaneously with Daniel. I very much wonder how the autoArm of a new cascade button is set to true without the user interacting in it and why Daniel didn't complain about the menu opening spontaneously :? but it is nice that you solved it.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply