Bug with OnMouseDown evaluation?

Discussion in 'PangoScript, Universe and Midi Templates' started by hitekvoop, Jul 13, 2015.

  1. hitekvoop

    hitekvoop Well-Known Member

    I have a very strange issue I will describe and provide repro case:

    I use OnMouseDown rather than OnChange as the touchscreen interface I have does strange things with OnChange. I can repro this issue with a single button in a brand new layout as follows:

    1. Create new layout
    2. create new button, select toggle mode
    3. Use following PangoScript
    if(value<0.5) goto StartAction
    StopCue 1,1
    StartCue 1,1
    It would appear that whenever you:
    a) change from edit to play mode
    b) right-click the layout tab in the universe
    c) open the universe with this layout selected

    The cue will be started without the button being clicked. If I change OnMouseDown to OnChange, the behavior doesn't occur.


    Attached is a layout. Rename and drop the .txt extension.

    Attached Files:

  2. hitekvoop

    hitekvoop Well-Known Member

    This is impacting my workflow. Will existing bugs within the 699 build be addressed, or is this build now abandoned (deprecated) with the official production release of Beyond?
  3. ENOT

    ENOT Software Developer Staff Member

    If you posted a whole code then it explain what is going in. Add "exit" as the first line of your script, it should help.

    Take a look at default script generated by BEYOND, you will such section at beginning:
    // PangoScript code template
    // .. put you initialization command here

    exit // each section always should have EXIT command

  4. hitekvoop

    hitekvoop Well-Known Member

    ugh! That's it. I hadn't realized the importance of the initial exit command.