Jun 9, 2009 at 2:40 PM

Is it possible to make the code wait in seconds? What is the method for waiting?

For example: I have another addon that sorts my guild bank tabs, but it takes some time to do each tab. So...I was going to make a button, that will execute the sorting of tab1, then wait for 30 seconds, then tab2...and so on and so forth.

I realize this is a new project, I know there are not many tutorials out (if any). Do any members know of any tutorials on this code and the best way to learn it? I know Dan has some links there, but I was wondering if anyone has actually made a tutorial site strictly dedicated to Addon Studio?



Jun 9, 2009 at 5:51 PM

The World of Warcraft Programming book has a tutorial on using AddOn Studio to build a simple "hello world" addon. It's probably your best bet, but we'd love volunteers to step up and build tutorials. We have some samples coming that should help, but we could always use more.



Jul 1, 2009 at 1:24 PM

You probably don't want "waiting" code in an Event Driven system. 

What you want to do is register a "TabSorted" event and then have code execute when the TabSorted event is fired (i.e. the operation is complete) 

Look at http://www.wowace.com/projects/callbackhandler/

This gives you a classic publisher subscriber event driven callback handling mechanism