[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 557
  • 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

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

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