Jump to content

Weird mouse flickering with ReDim


turbov21
 Share

Recommended Posts

(This is my first post, and I'm a total AutoIt newbie, so I apologize in advance if I mangle any terms.)

I'm working on a script that will pull down an XML file from a server, build a tree view based on the contents of that file, and allow me to load a different web address into a browser object when I click on the tree view node. To get the program to respond when I click on a tree view node, I've loaded each node into an array that gets checked in my event loop. That works, when I click on a node, the file shows up in the browser. What I realized while using the script was I was going to have a problem if the elements in my XML were ever greater than the size of my array. I thought I could put a ReDim in the program to grow the array as needed, and that kind of works.

Unfortunately, when ever the array size is reached and the ReDim occurs (whether I increase the array size by 1 or 100), when the GUI loads, the mouse is flickering and clicking on the tree nodes doesn't work. Here's my code: http://andrewburton.biz/blog/wp-content/up...obucket.au3.txt

Am I using ReDim wrong? Is it not possible to change the size of the array during this process? Any help would be welcome. Thanks!

Link to comment
Share on other sites

Link to comment
Share on other sites

Welcome to the forums!

...

Also, whats an example of the contents of the XML?

Thanks! Here's the XML I'm using:

http://kerovia.net/photobucket/opml/photobucket.opml

I fixed the problem by having another function that counts the nodes then does a single ReDim based on that number. However, the flickering still intrigues me. It's almost like the array gets so huge checking it for events is bogging the event loop down.

Thank for the link, too, I'll check that out.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...