ScrollListExample
Requries: none
Provides a simple working example of making a scroll list. The scroll list is a list of unlocked pets. When a pet is selected, it is summoned. The user can use /sle hide or /sle show to toggle the scroll list window.
>>> Entirely rewritten. The originals by pills are included for those are are curious.
Much has changed in the years since this was originally written so I decided to entirely rewrite this example. I tried to stay true to what I surmise was the original intent of the author, which was to provide a simple example that demonstrates the major elements of scroll lists. From the example, a person should learn enough to be able to apply the concepts to more complex applications. There is little error checking in this example. Error checking should be added by the programmer given their specific application.
I learned much of this from
LibScroll and many of the ideas here are derived from it.
I also added in a lot of documentation and a few examples on a couple ways to accomplish the same results. I am in no way an expert in Lua, XML, or scroll lists so someone more experienced may look at this and wonder why I did something a certain way when there may be a better way to do it. Thank you for your understanding.
----------------------------------------------------------------------------------------------------------
Original from pills:
A basic scroll list example stripped down from MailR Guild Mail Beta (which took its scroll list implementation from Librarian).
code is undocumented (read self-documenting). Its pretty straight forward if you just want a simple window with a scroll list.
To populate this list just move your reticle around and point at NPCs or other players. It will try to gather a couple pieces of info and then update the list. you can also click entries in the list and it will dump the contents to the chat window just to demontrate how to interact with the row entries.
hope this helps some of the authors that were having trouble getting scroll lists to work.