Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-11

Property TComponent.Tag change

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hi,

To remain compatible with the upcoming Delphi 64-bit release, I've changed the 'Tag' property type from Integer -> PtrInt.

The practical upshot from this is that you can store a pointer in it on all platforms. (a widespread abuse of the Tag property).

This potentially breaks some existing code if you rely on Tag having a size of 4 bytes.

If you do not rely on this, it should not break any code. If it does, I'd be interested in hearing about it so we can provide workarounds on the website.

Michael.

Reply by email

Luiz Americo Pereira Camara
to Michael Van Canneyt
Michael Van Canneyt wrote 6 lines
Hi, To remain compatible with the upcoming Delphi 64-bit release, I've changed the 'Tag' property type from Integer -> PtrInt.

Do you already has the info that Delphi will do this change?

Luiz

Show quoted text 21 lines
The practical upshot from this is that you can store a pointer in it on all platforms. (a widespread abuse of the Tag property). This potentially breaks some existing code if you rely on Tag having a size of 4 bytes. If you do not rely on this, it should not break any code. If it does, I'd be interested in hearing about it so we can provide workarounds on the website. Michael. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Michael Van Canneyt
to Luiz Americo Pereira Camara
Luiz Americo Pereira Camara wrote 8 lines
Michael Van Canneyt escreveu: > > Hi, > > To remain compatible with the upcoming Delphi 64-bit release, I've changed > the 'Tag' property type from Integer -> PtrInt. Do you already has the info that Delphi will do this change?

Yes. Marco Van De Voort got it from somewhere.

Michael.

Reply by email

Žilvinas Ledas
to Michael Van Canneyt
Michael Van Canneyt wrote 15 lines
On Tue, 23 Nov 2010, Luiz Americo Pereira Camara wrote: > Michael Van Canneyt escreveu: >> >> Hi, >> >> To remain compatible with the upcoming Delphi 64-bit release, I've >> changed >> the 'Tag' property type from Integer -> PtrInt. > > Do you already has the info that Delphi will do this change? Yes. Marco Van De Voort got it from somewhere.

It was announced here: http://twitter.com/kylix_rd "Be ready for 64 bit: In Delphi XE, this "Component.Tag := NativeInt(Self);" will just recompile in 64 bit. 11:08 PM Nov 2nd <http://twitter.com/kylix_rd/status/29505442761> via TweetDeck <http://www.tweetdeck.com>"

Regards
?ilvinas Ledas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20101124/737ba5e5/attachment.html>

Reply by email