Hi John,
I discovered an issue with ipc.execCalcCode. As long as parameter sent is exactly the same, subsequent calls are not re-evaluated. As soon as there is a different expression, between those calls it works. The easiest way to spot it is toggle buttons - if there is expression behind only the first toggle works.
In following example only the first toggle is executed. There can be any amount of time between two calls - it can be on different events for example - it always toggles just once.
-- This toggles marker mute
ipc.execCalcCode("(A:MARKER BEACON TEST MUTE, Bool) ! (>K:MARKER_BEACON_TEST_MUTE)")
-- Some time later
-- This should toggle marker mute to original state, but it doesn't
ipc.execCalcCode("(A:MARKER BEACON TEST MUTE, Bool) ! (>K:MARKER_BEACON_TEST_MUTE)")
This code, however, toggles correctly:
-- This toggles marker mute
ipc.execCalcCode("(A:MARKER BEACON TEST MUTE, Bool) ! (>K:MARKER_BEACON_TEST_MUTE)")
-- Some time later
-- Dummy expression, always evaluates to 1 without side effects
ipc.execCalcCode("1")
-- This now toggle marker mute to original state
ipc.execCalcCode("(A:MARKER BEACON TEST MUTE, Bool) ! (>K:MARKER_BEACON_TEST_MUTE)")
If there is execution of any other different gauge expression between calls with same parameter, those work are executed.
Cheers,
Nenad.