Michael Van Canneyt wrote:
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.
Accepted only because there was no other way.
The only
The problem here is that if you introduce a changing type to Tag, you're
going to break streaming of the components between various platforms.
However I think simplest would be to simply make the tag something huge
for years to come, like Int64.
The idea with hidden union is nice tho. But you'll
Am Mittwoch, 6. September 2006 11:05 schrieb Michael Van Canneyt:
On Wed, 6 Sep 2006, Ale Katona wrote:
The problem here is that if you introduce a changing type to Tag,
you're going to break streaming of the components between various
platforms. However I think simplest would be to simply
On Mon, 4 Sep 2006 07:13:53 +0200
Martin Schreiber [EMAIL PROTECTED] wrote:
On Monday 04 September 2006 02.55, Luiz Americo wrote:
I'd like to propose change TComponent.Tag type from longint to
PtrInt. I know it's not a good programing practice, but sometimes
this property can be used to
Op Mon, 4 Sep 2006, schreef Mattias Gaertner:
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,
Daniël Mantione schreef:
Op Mon, 4 Sep 2006, schreef Mattias Gaertner:
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
On Mon, 04 Sep 2006 11:56:06 +0200
Vincent Snijders [EMAIL PROTECTED] wrote:
Daniël Mantione schreef:
Op Mon, 4 Sep 2006, schreef Mattias Gaertner:
Me2.
Just one disadvantage:
The Tag is published.
If someone stores a 64bit value and the component is stored,
the stream can
Daniël Mantione schreef:
Op Mon, 4 Sep 2006, schreef Vincent Snijders:
Daniël Mantione schreef:
Op Mon, 4 Sep 2006, schreef Mattias Gaertner:
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
Marc Weustink wrote:
Michael Van Canneyt wrote:
On Mon, 4 Sep 2006, peter green wrote:
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
On Mon, 04 Sep 2006 13:16:11 +0200
Vincent Snijders [EMAIL PROTECTED] wrote:
Daniël Mantione schreef:
Op Mon, 4 Sep 2006, schreef Vincent Snijders:
Daniël Mantione schreef:
Op Mon, 4 Sep 2006, schreef Mattias Gaertner:
Me2.
Just one disadvantage:
The Tag is published.
If
...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.
BTW even borland themselves seemed to promote its use for storing pointers
from delphi 3 help:
Tag has no
Daniël Mantione wrote:
In 16 bit days it was considered acceptable to typecast pointers into
records and just increase their offset. However, it was not portable.
Making your code portable requires some effort. This kind of code is just
one example of things you should not do in portable code.
I'd like to propose change TComponent.Tag type from longint to PtrInt.
I know it's not a good programing practice, but sometimes this property
can be used to hold pointers.
In 32bit there's not many problems since pointer and longint have the
same size, but the thing changes in 64 bit.
The
On Monday 04 September 2006 02.55, Luiz Americo wrote:
I'd like to propose change TComponent.Tag type from longint to PtrInt.
I know it's not a good programing practice, but sometimes this property
can be used to hold pointers.
In 32bit there's not many problems since pointer and longint have
14 matches
Mail list logo