64 bit compiler.
tag is a nativeint, 64bits. i is an Integer thus 32 bit.
You cannot store a 64 bit pointer in 32 bit Value.
Correcteur orthographique de merde sur ma tablette.
Yes, I think you're onto the basic problem. I think I was compiling for a 32 bit target last time. That's what has changed.
I was trying to work out why this worked sometimes and it looked like it was when tag=0 .
Previously I compiled for an old laptop which had 32 Windows and x686 linux on it.
If I step through in the assembler window it's the fpc_do_as line which throws and error.
It's the actual SENDER I believe he has logged in the PACK object and it most likely 32 bit type,
I'm not sure what you think I have "logged".
sender is a generic argument of type TObject which points to the UI object whose event has been triggered.
In this case it's inheritted from Tpanel , a TwinControl itself a Tobject.
Whether it's a 32b or a 64b compiler I don't see why I can't cast a TObject sender to TwinControl or Tpanel, they all are inherited from the same souce, be it 32 or 64 bit.
I'm obviously missing something but I'm not sure what.