Forum > Beginners

And another question about the "record"

(1/2) > >>

beria:
Am I right to understand that using Enumerator and Initialize/Finalize for one record are mutually incompatible things, because any execution of Enumerator causes implicit and irrevocable additional procedures Finalize and Initialize, which completely kills the logic of initial initializing data in the record and removing dynamic objects inside it, when they leave the visibility area...

Thaddy:
Nonsense.

PascalDragon:

--- Quote from: beria on September 26, 2022, 12:06:37 pm ---Am I right to understand that using Enumerator and Initialize/Finalize for one record are mutually incompatible things, because any execution of Enumerator causes implicit and irrevocable additional procedures Finalize and Initialize, which completely kills the logic of initial initializing data in the record and removing dynamic objects inside it, when they leave the visibility area...

--- End quote ---

Well, it currently is the case that there is a bug related to that combination (namely if what is returned by GetEnumetor also uses management operators), so currently it can't be suggested to use both, but in the end it is supposed to work. What should work however is if a record type that uses management operators provides a GetEnumerator.

beria:

--- Quote from: PascalDragon on September 26, 2022, 01:21:00 pm ---
--- Quote from: beria on September 26, 2022, 12:06:37 pm ---Am I right to understand that using Enumerator and Initialize/Finalize for one record are mutually incompatible things, because any execution of Enumerator causes implicit and irrevocable additional procedures Finalize and Initialize, which completely kills the logic of initial initializing data in the record and removing dynamic objects inside it, when they leave the visibility area...

--- End quote ---

Well, it currently is the case that there is a bug related to that combination (namely if what is returned by GetEnumetor also uses management operators), so currently it can't be suggested to use both, but in the end it is supposed to work. What should work however is if a record type that uses management operators provides a GetEnumerator.

--- End quote ---

Thank you. I figured out that it's the error FPC.... There is no information about when it was fixed. Just if not long - this part of the code I'm currently rewriting can wait a few weeks... And I really don't want to do separate types just for GetEnumerator - there are already too many of them in the code.

PascalDragon:

--- Quote from: beria on September 26, 2022, 01:26:02 pm ---
--- Quote from: PascalDragon on September 26, 2022, 01:21:00 pm ---
--- Quote from: beria on September 26, 2022, 12:06:37 pm ---Am I right to understand that using Enumerator and Initialize/Finalize for one record are mutually incompatible things, because any execution of Enumerator causes implicit and irrevocable additional procedures Finalize and Initialize, which completely kills the logic of initial initializing data in the record and removing dynamic objects inside it, when they leave the visibility area...

--- End quote ---

Well, it currently is the case that there is a bug related to that combination (namely if what is returned by GetEnumetor also uses management operators), so currently it can't be suggested to use both, but in the end it is supposed to work. What should work however is if a record type that uses management operators provides a GetEnumerator.

--- End quote ---

Thank you. I figured out that it's the error FPC.... There is no information about when it was fixed. Just if not long - this part of the code I'm currently rewriting can wait a few weeks... And I really don't want to do separate types just for GetEnumerator - there are already too many of them in the code.

--- End quote ---

I said nothing about the bug being fixed. If you look at the link you'll see that the issue is still open and from my research it might be quite involved to fix. So absolutely no timeline for that.

Navigation

[0] Message Index

[#] Next page

Go to full version