Hallo, Tim Blechmann hat gesagt: // Tim Blechmann wrote:
i _suppose_ there is a bug in the gui code concerning the send/receives of toggles...
i attatched a part of an abstraction that produces this bug ... a |1( message is received, although no |1( message has been sent ...
if someone is interested in this behaviour, please check the attached patch / abstraction ...
to reproduce the bug to the following:
press "diag1_invert" press "vertikal" -> this results a message 0 to both "diag1_invert" and "vertikal" and a message 1 to "mitte_invert"
this is ok. but:
press "diag1" -> this results a message 1 to "mitte" that results a message 0 to all the other toggles ...
this behaviour is definitely wrong, since it should only have this specific behaviour if "vertical" is 1. i traced the sends and receives to the "vertical" toggle and it seems, there is a message |1(, coming from nowhere... (sorry, i'd like to be more detailed, but at the moment, i can't say more)
I added a [r sync-waende-vertikal-rec]->[print] and as hard as I try, there are only zeros coming into this. I would rule out, that the toggle is getting a 1 anywhere. Also when I remove the internal receiver and connect the [r sync-waende-vertikal-rec] to the toggle, I never get a 1. Which is natural, as there are only [0('s connected to everything that evaluates to "sync-waende-vertikal-rec". The only thing that *could* get a 1 outside a toggle is "sync-waende-mittei-rec" and "sync-waende-mitte-rec"
Other than that I still do not fully understand the flow of logic in that patch, which "feels" to be more complicated than it would have to be. At least the argument count of [sync/parse_sync1_12] makes me think: this is too much. (One would probably never write a C function which requires 13 arguments...)
I would recommend to factor out some of these, which would make user errors less likely (for starters remove redundancy like sync-waende-global as argument 13 everywhere.)
Frank Barknecht _ ______footils.org__