Hi Graham - I can't answer this in detail, but I have used the native switchbutton widget, a bit, without seeing any problem of the kind you describe. I'm catching the hiliteChanged message in the widget itself, not in the card script, for what that's worth.

(By the way, it scales - it's just that the default size is probably a bit excessive.)

On 23/04/2020 11:04, Graham Samuel via use-livecode wrote:
To add to my query below, there’s something even more strange. In my beta app 
there is a card with three Native Switch Buttons on it (they all have different 
names). i have another test card, as described before, with its own switch. 
When a button script on yet another card executes a ‘go' to the 3-switch card, 
the hiliteChanged handler in the test card fires, even though the card isn’t 
open! Again, the switch on this card has a different name - I read somewhere 
that widget names have to be unique - but this CAN’T be expected behaviour, can 
it? I am about to issue a bug report, but it may take too long to get a recipe.

Graham

On 23 Apr 2020, at 11:28, Graham Samuel via use-livecode 
<use-livecode@lists.runrev.com> wrote:

Is anyone using the Native Switch Button? It looks OK (a bit big on my iOS 
simulator, but it will do) and it works - although the insanity of spelling 
“highlight” two ways in the one object is apparent - but running an experiment 
just now in which I go to a card with such an on object on it and not much 
else, certainly nothing in the card script, a ‘hiliteChanged’ event is 
triggered even though AFAIKS the highlight (see what I did there?) hasn’t 
changed.

Is this expected behaviour? I can’t really believe it, but as usual I can’t see 
what i’m doing wrong. I certainly don’t want the message to be triggered unless 
the user touches the screen or I deliberately change the state by script.

Graham

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to