turbov21 Posted April 30, 2009 Share Posted April 30, 2009 (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.txtAm 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 More sharing options...
BrettF Posted May 1, 2009 Share Posted May 1, 2009 (edited) Welcome to the forums!Might be easier to check out this thread.http://www.autoitscript.com/forum/index.php?showtopic=19848Also, whats an example of the contents of the XML?Cheers,Brett Edited May 1, 2009 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
turbov21 Posted May 1, 2009 Author Share Posted May 1, 2009 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.opmlI 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now