hilite in widget"switch"script does not work, but does in...

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

Post Reply
sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am

hilite in widget"switch"script does not work, but does in...

Post by sphere » Mon Sep 19, 2016 9:27 pm

Hi,

can someone please explain:

in a simple button this works:

Code: Select all

if the hilited of widget"switch" then
   put "localport=" into sPort
   put fld"addthis" after sPort
else
   put "program=" & quote into sPort
   put fld"addthis" & quote after sPort
end if
but in the widget itself this similair code is not working:

Code: Select all

on hiliteChanged
    if the hilited of me then
      set the visible of widget "hithere" to true
else
    set the visible of widget "hithere" to false
  end if
end hiliteChanged
already tried hilite and highlight, which does not help

when you use the standard code "put the hilited of me" then it show true or false so that's ok

So from another button it seems to work using the hilite of it
but in the widget itself not

Using LC8.1 stable

Any suggestions on this?

Thanks a lot!

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: hilite in widget"switch"script does not work, but does i

Post by [-hh] » Mon Sep 19, 2016 10:13 pm

Your script works here as it should. I used a clock-widget (named "hithere") for testing.

[Mac OS 10.11.6 / LC 8.1.0]
shiftLock happens

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am

Re: hilite in widget"switch"script does not work, but does i

Post by sphere » Tue Sep 20, 2016 6:54 pm

I ...guess...i...was...very...tired....yesterday....and...not...thinking....clear....

left the Show Invisible Objects on...................................................................

and it's not the first time i did that..................................................

:oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops:

one lesson, do not code when you're tired.............. :roll: :roll: :roll:

:lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: hilite in widget"switch"script does not work, but does i

Post by jacque » Wed Sep 21, 2016 5:04 pm

do not code when you're tired
If I followed that rule I'd never get anything done.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am

Re: hilite in widget"switch"script does not work, but does i

Post by sphere » Wed Sep 21, 2016 7:48 pm

i know what you mean, especially when your searching for a solution and know you're almost there and your whole systems tells you 'go to sleep' but you still go on and on and on....eyes like this :shock:

Post Reply