[Webinar] Streamline your web hosting managementRegister Today


Move contents from a pointer to another

Posted on 1999-07-05
Medium Priority
Last Modified: 2010-04-06
How do I move all pointers from one TList to another?
I have a Tlist full of objects, and now I want to destroy that Tlist, after I saved the information in another (eg TList2). How do I do that?

The following code also frees Tlist2, which isn’t desirable…

TList2 := Tlist1

Question by:volavy
  • 2
LVL 27

Accepted Solution

kretzschmar earned 90 total points
ID: 1386163
hi volavy,

seemed so, that there is no other way than
for i := 0 to list1.count - 1 do list2.add(list1[i]);

LVL 20

Expert Comment

ID: 1386164
Well, I didn't try, but can't you use this:



Regards, Madshi.
LVL 27

Expert Comment

ID: 1386165
hi madshi,

tlist has no assign-method.
this was the first i've searched for.

meikl ;-)

Author Comment

ID: 1386166
It is strange that there isn’t another solution. But it will do :)



Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…
Suggested Courses
Course of the Month10 days, 6 hours left to enroll

591 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