Variable branching and UDP
Posted: Thu Sep 15, 2016 4:22 pm
The listbox variable branching example works great, so I tried extending the principle to allow conditional branching depending on received udp msgs of [test1] or [test2] etc.
That also works great, but it threw up an awkward usage conflict... the udpbranch [branch] requires terminationg it's subroutine with a 'return' in order to receive another incoming udp msg, but that means that you can't 'wait' in any other subroutines for any other events.
But almost every event other than udp requires a 'wait' - so although a udp msg can cause a 'variable' branch to different subroutines, it can't actually do anything in them which needs to end in a 'wait', else the udpbranch is never returned to for receiving any more udp msgs.
So... would it be possible to somehow modify the udpbranch 'return' into a 'wait' to make it compatible with other event handling?
That also works great, but it threw up an awkward usage conflict... the udpbranch [branch] requires terminationg it's subroutine with a 'return' in order to receive another incoming udp msg, but that means that you can't 'wait' in any other subroutines for any other events.
But almost every event other than udp requires a 'wait' - so although a udp msg can cause a 'variable' branch to different subroutines, it can't actually do anything in them which needs to end in a 'wait', else the udpbranch is never returned to for receiving any more udp msgs.
So... would it be possible to somehow modify the udpbranch 'return' into a 'wait' to make it compatible with other event handling?