Recent

Author Topic: [Ignore-Me] TFPGList.Assing(TFPGMAP[ValidKey]) //WIth valid data not assigning.  (Read 207 times)

jamie

  • Hero Member
  • *****
  • Posts: 7707
For some reason the Assign is not assigning the source object to the LiST object.

I did an Assert of the Data for the key of interest and the data is there, this is prior to attempting the assignment.

So, I have a TFPGMAP<KeyRecord, TMyDrawingObjects>;

and a TFPGLIST<TMyDrawingObjects>;

SO I would expect this.

Code: Pascal  [Select][+][-]
  1. Assert(MyMapofDrawingObjects[Valid-Key]<>Nil); //Passes
  2. MyListOFDrawingObjects.Assign(MyMapOfDrawingObjects[Valid-Key]); //No errors but does not assign.
  3.  

The only thing I can add to this is the source of the "MyListOFDrawingObjects" is a VAR parameter of the current function body, so it's not local but a reference if that makes any difference.

 When I view this the receiving Drawing Object List it is empty with 0 count of items and there is at least 2 items at this time in the source.

 what's happening here?

Jamie



« Last Edit: April 22, 2026, 01:39:28 am by jamie »
The only true wisdom is knowing you know nothing

jamie

  • Hero Member
  • *****
  • Posts: 7707
Re: TFPGList.Assing(TFPGMAP[ValidKey]) //WIth valid data not assigning.
« Reply #1 on: April 22, 2026, 01:38:22 am »
I think you guys can scratch, I believe this is actually working.

It appears the list coming from the source is valid (not nil) but the list has no items in it so in turn the receiving list ends up being empty..

Sorry for the noise.

Jamie
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018