Forum > LCL

TStringList with objects

<< < (15/15)

ASerge:

--- Quote from: jipété on December 01, 2022, 12:05:56 pm ---Something is wrong, somewhere...

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  s:=IntToStr(Integer(MyClass)); // compiler says : Error: Illegal type conversion: "TObject" to "LongInt"    // with the word Integer underlined with red //Or use TypeHelper "ToString" --> s:=Integer(MyClass).ToString;  s:=Integer(MyClass).ToS // shows ONLY "ToSingle" :(

--- End quote ---
The size of the Integer type does not always match the size of a pointer. Use the SizeInt type instead.

jipété:

--- Quote from: ASerge on December 01, 2022, 03:10:16 pm ---Use the SizeInt type instead.

--- End quote ---

OMG !
First time in my long programming life that I see that word !  :o

And thanks thanks thanks, it worked perfectly !

May I ask another related question ?
I want to store Word, DWord and QWord (found in help, this one will use SizeUint) : what types using ?
Help only knows SizeInt, SizeUInt and SizeIntArray.

EDIT
Found solutions :
For Word, there is a TWordHelper,
For DWord, coz' it looks like Cardinal, there is a TCardinalHelper.

Navigation

[0] Message Index

[*] Previous page

Go to full version