Plex 2E

 View Only
Expand all | Collapse all

Action Diagram Debugger run VS   Plex right click >run WINC function call

Jump to Best Answer
George Jeffcock

George JeffcockDec 02, 2014 08:02 AM

George Jeffcock

George JeffcockDec 02, 2014 08:21 AM

  • 1.  Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 02, 2014 07:40 AM

    Hi,

    I am experiencing a weird scenario with a WINC Screen that I created.

    We are still using Plex 6.1 .

     

    I added log messages in my function to Check what events gets fired and what subroutines gets called.

     

    When I generate and build the screen in plex and (right click > run) my logging displays.. but I expected no logging as I placed the logging in events that should not execute when you open the screen(right click > run).

     

    When I debug the function (right click > Action Diagram Debugger) and  click GO not step the screen opens and there’s no logging ..witch I expected.

     

    It’s the same function same logging but different results.

     

    It seems Like When running the function with the debugger it does what its supposed to do but when I run it out of plex without the debugger its not working(going into events it should not example the Load Grid event)

     

    Why would the execution of the code differ? The function is the same… does it have something to do with runtime?

     

    My Logging when running the debugger and opening the screen -Correct:

    debugger.PNG

    My Logging when running the same function in plex right click run -Not correct

    PlexRun.PNG

    Thank you.



  • 2.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 02, 2014 08:02 AM

    (right click > Create Exe)



  • 3.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 02, 2014 08:18 AM

    Hi, I created an exe and its still displaying the same as when I am running it out of plex with all the logging.



  • 4.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 02, 2014 08:21 AM

    is it a child site ?



  • 5.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 02, 2014 08:22 AM

    need a picture of AD really to see the messages and where they are



  • 6.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 02, 2014 08:46 AM

    Hi,

     

    The screen Has grids and we are reloading them after initialize but I added code to exit the loading of the grid by checking an indicator when the screen opens. I have included pics of AD and you will see my code to bypass Load Grid and I added logging Event1 just to see if it goes into the sub Load Grid again. With Debugger it works and  event1 is not printed but running from plex it prints the event1. please see previous pics aswell.

     

    1.PNG

    2.PNG

    3.PNG



  • 7.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call
    Best Answer

    Posted Dec 02, 2014 09:06 AM

    ok so what you want is different behaviour than the inherited behaviour of loading the grids on initlization

     

    It would take a log time to explain the issue you are having but firstly would just like to get the behaviour to work.

     

    I would in Pre Point End initialize

    Go sub Set Environment Colour

    Exit Sub

     

    Or use a technique like undefine Subrountines but in this case go to your Grid1, grid2, grid3, grid4 pattens and put sequences around the individual go subs allowing a developer to switch off the behaviour.

     

    Let me know if it works as you would like with the exit sub. Then we can disucss why it was not working the other method



  • 8.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 02, 2014 09:21 AM

    Thank you!!, I tested it by adding a exit sub in the edit point initialize and it works I will add code in our standards patern that will allow us to modify the behaviour.

     

    What did I do wrong or why is this happening? And why did it work in the debugger?



  • 9.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 02, 2014 09:22 AM

    It helps when you have a different point of view



  • 10.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 02, 2014 09:39 AM

    glad it worked.

     

    I consider the debugger to be invaluable but a bit..how do I say...cr&p

     

    So took the behavior being exhibited with out the debugger to be true but by creating the exe discounted it to be a runtime issue..ie picking up different runtimes...well reduced the chance it was runtime.

     

    Grids trigger events all by them selves.

     

    Search in plex help for 'The Load Grid Physical Event ' and you find a great help page on 'Loading a grid'

     

    Your code in was to late in the process in Load Grid it needed to be in Reload Grid with the rather ugly flag method, it needed to be before the intilisation of the grids and the all important 'Set Grid End On statements '



  • 11.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 03, 2014 04:19 AM

    Hi, I am busy implementing to undefine the reloading of the grid in our standards pattern as you suggested. So now  a developer could undefine it before the intilisation of the grids.


    And I checked the documentation that you suggested in the help. I know the Load grid event gets executed by itself but after I undefined the reload of the grid before initializing the grid. But its still going into the load grid event.


    You also mentioned that it should be before the "Set Grid End On" statement.. where will this statement be?

    In my grid initialize there's a statement "Set Grid End Off" but how does plex know where to set it on?

     

    What am I doing wrong... or where should I be calling my code?

    rel1.PNG

    rel2.PNG


     



  • 12.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 03, 2014 05:31 AM

    or use Option NME triples  to switch off the undesired behavior at generation time

     

    just a typo and should have been before the following statement

    Set Grid End Off  GridP

     

    LoadGrid.png



  • 13.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 03, 2014 06:26 AM

    Thanks for your reply,

     

    When I undefine die reloading of the grid as per my previous post the load grid event still fires and my grid hangs?

    And this is done before the Set Grid End Off  GridP

     



  • 14.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 03, 2014 06:39 AM

    In Edit point End initialize I put a Exit sub... and its still executing the load grid event?

     

    Why and how can I prevent this because the grid is hanging?

     

    end.PNG



  • 15.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 03, 2014 06:48 AM

    remap the event to see for sure and have a message in 'myevent'

    Untitled.png



  • 16.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 03, 2014 07:05 AM

    I remaped the Load Grid event to Myevent and added a popup message in my event. When I run the screen the message displays .. even when exit sub is in the initialize



  • 17.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call



  • 18.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 03, 2014 08:32 AM

    Thank you the Url did the trick.

     

    In my pre initialize I coded for each grid a Set Grid End On statement and now its working.....

     

    I do not know why this is not happening by default in plex for this screen. But its working now and I can continue.

     

    Thanks



  • 19.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 03, 2014 08:38 AM

    i think your blockfetch is failing to return EOV or such as your client just loops calling it again. The behaviour is first that LoadGrid is called for a grid that is empty but it is your blockfetch that is compounding the problem



  • 20.  Re: Action Diagram Debugger run VS   Plex right click >run WINC function call

    Posted Dec 03, 2014 07:40 AM

    I Created a new empty screen that just inherits from Grid and in the Edit point End initialize I put a Exit sub.

    also maped the load grid event to Myevent with a message that will dis[play if Load grid gets fired.

     

    When I run the screen it also shows the message but it does not hang like my other screen