Report post

Are you sure you want to report the post shown below? This will send an email to the ATVO administrators. Please include a short reason for reporting.

Users reporting for no reason may be locked out.


Post

Posted by Nick Thissen
on
The dropdowns to change ticker mode (gap, interval, pitstops, etc), are complicated in the ATVO theme, but they are the most "efficient" way to achieve the result.

Simply copy/pasting them without understanding is likely not to work.

The way it works is all via the GapBindingConverter script in combination with the two dropdowns "DD_TimingModeH" and "DD_TimingModeV". The script has two functions:
  • Update which mode is the current mode
  • Convert each result (driver) into the requested value for that mode, e.g. gap or interval or pitstops etc

It determines which of these functions to execute by looking at the Value input. If that is a text value, it expects either "H" or "V" corresponding to each ticker. Then, it looks at the text of the selected dropdown item. The text has to match exactly with one of the valid TimingDisplayModes defined at the top of the script. Any mismatch and it will fail.

Whenever you change the selected dropdown item, it calls the same script every time ("GapBindingConverter.cs"). The Value in the action is used to specify which ticker is changed ("H" or "V" for horizontal or vertical).

The script first checks if "H" or "V" value is specified, which indicates that it is being used to change the ticker mode of that ticker. If it found which ticker to change, it then grabs the corresponding dropdown by finding it by name (either "DD_TimingModeH" or "DD_TimingModeV"). It then looks at the text of the selected item, and converts it to one of the valid "TimingDisplayModes". Then, the current mode is set to that mode.

I realize this is complicated, but I wanted to add this to showcase what kind of complicated logic you can achieve. There are easier ways to achieve this especially with just one ticker