Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TlistItem.data - store and use a word/integer?

Posted on 1999-07-14
2
Medium Priority
?
898 Views
Last Modified: 2012-08-13
How do I store a word or integer in the TlistItem.data property and then get it in a usable form? I tried
ListItem.Data := addr(wordvar);
this results in a pointer, but how do I convert this to a value I can use?
0
Comment
Question by:gelat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 400 total points
ID: 1388629
Just cast the pointer back to what you want:

MyValue := Integer(ListItem.Data);

Cheers,

Raymond.

0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1388630
I need to add something. The answer is correct (though you would cast with word for a word value), but you need to set the value differently...

Do it like this:

ListItem.Data := Pointer(WordVar);

Cheers,

Raymond.

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question