Right. In case of graph interface, the number of objects is calculated at kernel stage, when the constructor file is read. In your case, the number of objects (transaction is also a kernel object), is unknown. So, the kernel should be dynamic. Its size must change.
(I need to do the same when creating a vis. studio, where user adds objects to kernel without re-initialization).
Correct. In the case of the graphical interface, the number of objects is counted at kernel construction stage, when the constructor file is read. In your case, the number of objects (transaction is also a kernel object), is unknown. So, the kernel should be dynamic. Its size must change.
(I need to do the same when I create a vis. studio, where user adds objects to kernel without re-initialization).
No. That was just a simplified example. However, in a two-dimensional Kernel, the number of object properties must be known in advance.
Please clarify, what do you mean by "known in advance"? That each item has a predefined number of properties , or that each of these properties must be set by the user?
Please clarify what you mean by "predefined"? That each element has a predefined number of properties , or that each of these properties must be set by the user?
Once you've set a number of properties for an object, you can't change it. If you change it, you will be out of the array.
You have to know all the properties of your objects beforehand. Give them indices. And all of them must fit in the row of the Kernel.
But, the Kernel can be dynamic, and you can change the number of Items and Objects in it. For this, use ArrayResize.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Add a number to the array using ArrayResize on each transaction, and write the properties of the transaction to it.
I.e. for a predetermined number of elements we use this:
And to create elements dynamically, we use ArrayResize. Right?
I.e. for predefined number of elements we use this:
And to create elements dynamically, we use ArrayResize. Right?
Right. In case of graph interface, the number of objects is calculated at kernel stage, when the constructor file is read. In your case, the number of objects (transaction is also a kernel object), is unknown. So, the kernel should be dynamic. Its size must change.
(I need to do the same when creating a vis. studio, where user adds objects to kernel without re-initialization).
Correct. In the case of the graphical interface, the number of objects is counted at kernel construction stage, when the constructor file is read. In your case, the number of objects (transaction is also a kernel object), is unknown. So, the kernel should be dynamic. Its size must change.
(I need to do the same when I create a vis. studio, where user adds objects to kernel without re-initialization).
And if I always use ArrayResize instead of
Will it be an error?
What if I always use ArrayResize instead of
Would that be a mistake?
No. This was just a simplified example. However, in a two-dimensional Kernel, the number of object properties must be known in advance.
Man is just another of Nature's bicycles. Genetically, he is only three per cent different from an ape. However, you don't confuse the two.
No. That was just a simplified example. However, in a two-dimensional Kernel, the number of object properties must be known in advance.
Please clarify, what do you mean by "known in advance"? That each item has a predefined number of properties , or that each of these properties must be set by the user?
Please clarify what you mean by "predefined"? That each element has a predefined number of properties , or that each of these properties must be set by the user?
Once you've set a number of properties for an object, you can't change it. If you change it, you will be out of the array.
You have to know all the properties of your objects beforehand. Give them indices. And all of them must fit in the row of the Kernel.
But, the Kernel can be dynamic, and you can change the number of Items and Objects in it. For this, use ArrayResize.