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:
My Logging when running the same function in plex right click run -Not correct
(right click > Create Exe)
Hi, I created an exe and its still displaying the same as when I am running it out of plex with all the logging.
is it a child site ?
need a picture of AD really to see the messages and where they are
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.
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
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
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?
It helps when you have a different point of view
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 '
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?
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
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
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?
remap the event to see for sure and have a message in 'myevent'
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
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.
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
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