Access to the grid object in other screen
27 Juni 2019 um 3:14 pm #33050RobinTeilnehmer
What you described it seems to me, let’s say, a „normal“ behavior.
The popup „takes the control“ and the actions must be taken inside this context.
You cannot act freely on the synoptic below.
The workaround could be use „Open frame“ instead of „Open popup“.
28 Juni 2019 um 2:57 am #33053
Maybe you didn’t understand me. Actually, i want to get the property and method of the object in another screen with Basic script, like „GetSynopticObject“.
In the popup screen, i inserted a button, and added „click“ event of Basic script. In the script, i tried to access to the grid control in another screen, but when i run the application, it always come out an error message.
28 Juni 2019 um 3:35 pm #33054RobinTeilnehmer
Ok now is more clear 🙂
I can see this easy approach to optimize the script context (it’s not the top for my experience to keep sparse scripts in different objects as you are looking for to do).
I would suggest to proceed as follows:
-The script only under the grid object script context
-Then, let’s say, you have to refresh the grid from another screen as You told on the form…
-You can insert an internal tag like „GridRefresh“, it’s a boolean variable, and you can toggle this variable normally from a button for example (standard commands)
-Under the grid object you can add a „VAR Script Event“
-From the Movicon editor Resources Exporer > expand the screen resource > get the grid object , then right click > Add new variable script event > and select the GridRefresh variable
-In the script conext under the grid you will have this event:
the script will be like:
Public Sub OnGridRefreshChanged(value As Variant)
‚Refresh Grid Object
every time you changed this tag You will refresh the object
I think it’s the better approach
26 März 2020 um 6:17 pm #36015
potrei avere maggiori dettagli riguardo alla creazione del VAR script event all’interno di NEXT build 270.
Mi trovo a dover risolvere lo stesso problema esposto nel post ma non riesco a capire come creare il VAR script event e come utilizzarlo nello script del grid control
Du musst angemeldet sein, um auf dieses Thema antworten zu können.