[fpc-devel] Propose: change TComponent.Tag from longint to PtrInt

peter green plugwash at P10Link.net
Mon Sep 4 12:10:14 CEST 2006


>
> > Me2.
> >
> > Just one disadvantage:
> > The Tag is published.
> > If someone stores a 64bit value and the component is stored,
> > the stream can not be read under 32bit anymore.
>
> ...which makes it impossible to use streams for anything derived from
> Tcomponent, which is really a lot. I don't think we should break this
> feature to allow broken code to work.
ahh the joys of conflicting requirements,

I don't consider storing a pointer in the tag is broken code, it was
considered the accepted way to maintain a pointer to your custom data from a
standard control and there is often no simple alternative.

how does streaming of components work? would it be possible to make tag able
to accomodate a pointer while only writing the least significant 32 bits to
a stream?




More information about the fpc-devel mailing list