Facility Control

 View Only
  • 1.  API Functions disappear.

    Posted 06-17-2016 00:27
    So I wrote a couple of API functions (that wrap RossTalk commands so that I can use them in visual logic). I created a task for a button using one of the API calls, and all was good.

    After a little more work, the API commands no longer appear in the list in visual logic. The talk I created earlier was still there, and still had the visual components for the api calls - but they are no longer an option for the very same button, and don't appear for anything.

    Any advice?


  • 2.  RE: API Functions disappear.

    Posted 06-17-2016 15:48
    My first guess would be that you might have a syntax error in the API file.
    Try running it through a JavaScript validator like http://www.jslint.com/ to see if it is properly compiling.

    If this is the case, the existing calls would appear in Visual Logic but if it is unable to parse/execute your API file, it will not show the functions to add additional calls or add your new functions.

    If the script validates, let me know and we can try to debug further.
    #DashBoard


  • 3.  RE: API Functions disappear.

    Posted 06-20-2016 15:29
    I've found that by ticking the 'Execute Immediately' box in the API Attributes, if I have a syntax error I get a red warning message at the top of the Dashboard and a debug message that can help track the problem down. Unticking the box kills the messages.
    #DashBoard


  • 4.  RE: API Functions disappear.

    Posted 06-22-2016 18:38
    Yup... thanks for the advice. I had written the raw functions and they worked, then I added a check (a simple if statement) and used "<>" instead of "!=".
    #DashBoard