codesysnewbie - 2023-06-14

I wonder is it possible to have a dynamic content inside a table? i.e. we need to show variable number of rows in a table (we don't know a limit in advance).

I've tried to create a dynamic array of structures using something like this:

foo: pointer to struct_type;

foo := __new(byte, sizeof(struct_type) * number_of_elements);

and providing the table visualization with the 'foo' (into the "Data array" property). But the table shows only the first structure from the 'foo' memory.

How can I implement dynamic content in the table?

EDIT: May be it's possible to temporarily change type of the 'foo' variable so the table will "see" it as an array of structures?

 

Last edit: codesysnewbie 2023-06-14