WoW:User interface customization guide: Difference between revisions

→‎Tips and tricks: message() for debug messages... yeah sure.
m (Cleanup)
(→‎Tips and tricks: message() for debug messages... yeah sure.)
Line 73: Line 73:


== Tips and tricks ==
== Tips and tricks ==
''World of Warcraft'' supports dynamically '''reloading the user interface'''. At any time, you can modify the XML and Lua files and then reload them by either typing:
''World of Warcraft'' supports dynamically '''reloading the user interface'''. At any time, you can modify the XML and Lua files and then reload them by typing any of the following slash-commands in the chat edit box:


* /console reloadui
* <code>/console reloadui</code>
* <code>/script ReloadUI()</code>
Some (developer-) addons also register their own commands to reload the ui, they are usually short and so more convenient for development. Just try them out to see if they are available.
* <code>/rl</code> (from Ace-Console)
* <code>/rld</code>
* <code>/reloadui</code>


OR


* /script ReloadUI()
If you are not sure what is happening in a script, '''use the [[API print|print()]] function to print a message into the default chat frame'''. This function is extremely forgiving and will print any variable.
 
OR
 
* /rld
 
If you are not sure what is happening in the script, use the '''message() function to print a message and view variables'''. Once the dialog is shown, your script keeps on executing, but no other message() calls will show anything until you click the button to dismiss the dialog.  


Feel free to experiment. If you break something, starting fresh is really easy. If you have questions, look on the forums to see if other people have already figured out the answers. Occasionally, Blizzard staff will be available to answer scripting questions — we value your feedback!
Feel free to experiment. If you break something, starting fresh is really easy. If you have questions, look on the forums to see if other people have already figured out the answers. Occasionally, Blizzard staff will be available to answer scripting questions — we value your feedback!
Anonymous user