Sie sind nicht angemeldet.

perspixe

Schüler

  • »perspixe« ist der Autor dieses Themas

Beiträge: 64

Wohnort: Bologna, Italia, Vancouver, BC

  • Nachricht senden

1

Mittwoch, 3. August 2016, 11:02

difficulty with switch action

oh well, I feel very stupid. Let's try to make it work...

I declare in a startup action:

Quellcode

1
set (thisPOVe, 0);



then in an action dealing with onkeydown events I have:

Quellcode

1
if (keycode == 16, switch (thisPOVe,1,2,3,4,5,6,7); trace (get(thisPOVe)););


So every time the shift key is pressed, a new value from the switch action list is traced.
In the log I get nothing else than original declared value 0.

Missing something I guess...

2

Mittwoch, 3. August 2016, 17:17

Hi,

the switch() actions works only when the current value can be found in the list of the switch values - and 0 is not in your list.

Best regards,
Klaus

perspixe

Schüler

  • »perspixe« ist der Autor dieses Themas

Beiträge: 64

Wohnort: Bologna, Italia, Vancouver, BC

  • Nachricht senden

3

Mittwoch, 3. August 2016, 18:51

That is what was missing. working now.
Thanks a lot.