• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 583
  • Last Modified:

Listview Error add error

When I try that code I get following error * Unable to insert an item *


 with MainForm.TreeView1.Items do

 if dat[0] = '' then
  begin
  if MyFreeRefNode1 = nil then
  begin
     MyTreeNode1 := Add( MyTreeNode1, '@ '+MainHost ); {add master node}
     MyFreeRefNode1 := MyTreeNode1;
  end;
     AddChild( MyFreeRefNode1, 'Lobby: Error no lobbys found.' ); { add error node }
  end
  else
  begin
     if Not Assigned ( MyFreeRefNode1 ) then
     begin
       MyTreeNode1 := Add( MyTreeNode1, '@ '+MainHost ); {add master node}
       MyFreeRefNode1 := MyTreeNode1;
     end;
     AddChild( MyFreeRefNode1, dat[0] ); {add lobbys node}
 end;

0
fiveuk
Asked:
fiveuk
1 Solution
 
TheRealLokiSenior DeveloperCommented:
This is an EOutOfResources Error
you can get this if your program is doing a loop that doesn't exit, it can occur before a Stack overflow error
Make sure your code is not doing an endless loop
If you are still stuck, try posting the bit of code that happens around the code you have already posted.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now