Native Switch Button?

Ben Rubinstein benr at cogapp.com
Thu Apr 23 11:24:30 EDT 2020


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, theres 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 isnt open! Again, the switch on this card has a different name - I read somewhere that widget names have to be unique - but this CANT 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 at 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?) hasnt changed.
>>
>> Is this expected behaviour? I cant really believe it, but as usual I cant see what im doing wrong. I certainly dont want the message to be triggered unless the user touches the screen or I deliberately change the state by script.
>>
>> Graham



More information about the use-livecode mailing list