Vision Table propertyChange

Hi,
Ignition v.8.1.12
Is it possible somehow to catch propertyChange just once?
when I print event.propertyName, so it gives me a lot of "data" and some other properties were changed many times:

selectedColumn
data
Pressed
columnAttributesData
selectedColumn
columnAttributesData
Pressed
selectedRow
selectedRow
data
columnAttributesData
columnAttributesData
columnAttributesData

This situations is bad because I run some scripts on for example "data" property..
so it executes (in this case) 2 times... How to escape this?

Thanx in advance!

That usually means you are manipulating the component in those events in ways that cause a cascade of further events. If you assign to any bindable property in a component, you generate that property’s event immediately. The script doing the property assignment pauses as the script for the “inner” event runs. This can recurse to extreme levels (usually freezing the UI). Also, some properties are changed by the component multiple times naturally in order to achieve correct operation: like assignment to data will cause two assignments to selectedRow to remove and then re-apply the value.

You cannot prevent these extra events. You must work around them, possibly using a state machine in a custom property to identify the case you really care about.

Share what you are trying to achieve and we might be able to provide more specific guidance.

Hi,

Thanx for Your replay.

I have such kind of Table:

When I press on cell, so I use ‘cellEdited’ event and also ‘propertyChange’ (events: data, selectedRow) at the same time.
When mouse released I call script from library, which sets an internal tag in TagBrowser a random value (when this value has changed so it calls Legacy Script).
The main idea all of this is: When I manipulate this table (setting/resetting cells), I set/reset some tags in Tag Browser and then I refresh this Table on every client who open this Graphic Display.
LegacyScript refreshes data for this Table.

Green color means the feedback from real variables, checkbox indicates internal variables, so when I manipulate these internal variables, I have to set real variables to internal values))) omg I can’t even explain how my script works))) it’s so difficult…

so. the logorythm:

  1. client open Graphic display with this Table.
  2. Sets/resets checkboxes (internal variables)
  3. Every checkbox manipulation calls CONFIRM popup (system.gui.confirm)
  4. When user confirms his choise, so the script is calling, which sets/resets real variables according to checkboxes (internal tags) values.
  5. The LegacySCript checks the status of internal and real variables, sets/resets real values
  6. Calling script which sets to memory variable random value to update Table (for indication), which makes changes to all users who has opened this Graphic Dosplay

ufff… :sweat_smile:

No, if you are having a situation where propertyChange triggers multiple times you can end up in and infinity loop (undesired).

You probably need to enhance all the execution flow. If you can't explain what the script is doing, I doubt someone can help you with this. Personally I don't understand everything you've explained.

That sounds unnecessarily complicated. Please describe how the table is populated when it is first opened.

1 Like