vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 --About--
2 MCom provides several functions designed to lower the amount of code required to make an addon be configurable. It helps to handle the things that need to go on to handle user input, either via console or via some GUI(like Cosmos or Khaos).
3  
4 It aims mainly at tasks that are repeated in multiple places in every addon. Any addon that wants to have chat commands needs a chat handler, and functions for each command it can accept. It also needs functions for updating the variables that have to do with configuration. Addons may also need wrapper functions for a GUI interface. They may also need to have multiple registers to support multiple GUIs, such as Cosmos and Khaos.
5  
6 These things are all handled by MCom either by registering with it for such functions, or by calling functions that do the repetative part.
7  
8 Have a look at the source code of MCom.lua for detailed comment explainations for usage of all MCom functions.
9  
10 --Installation Info--
11 MCom is designed to be embeded inside addons, users should not need to get MCom, it is only for developers.
12 To use MCom in your addon, simply copy the MCom folder into your addon. Modify your toc file to have an optional dependancy on MCom, and add an include to your toc file for it, like this: MCom\MCom.xml
13  
14 --Dependencies--
15 Optional: Sea, Sky, Cosmos, Khaos, myAddOns
16  
17 --Author Info--
18 By: Mugendai
19 Contact: mugekun@gmail.com
20  
21 --Change Log--
22 v1.49:
23 -safeLoad now works more appropriately with the new per addon settings methodology
24 v1.48:
25 -Updated for 1.8 patch
26 -Updated the Sea unhook wrapper to match up with 1.05
27 v1.47:
28 -Updated the Sea hook wrapper to match up with 1.04
29 v1.46:
30 -Added support for new myAddOns version 2.2, this includes new variables for date, author, email, etc...
31 NOTE: For your addon to work properly with myAddOns the uisec, or uiseclabel used to register with MCom for myAddOns must be identical to the name in the TOC file. You can use reglist.addonname to force this if neccisary.
32 v1.45:
33 -Fixed bug where uiname was not being imported for slash command output when no slash command name was given
34 v1.44:
35 -Fixed a bug where an error would occur, if Sea didn't exist
36 v1.43:
37 -Signifigantly improved the appearance of the TextFrame dialog used for displaying help info
38 v1.42:
39 -Fixed case-insensitive setting of choice/pulldowns from slash commands
40 v1.41:
41 -Fixed Khaos option set usage even more, was missing several options
42 -Fixed default and disabled states of checkboxes, and pulldowns
43 -Added uidep for setting Khaos dependencies
44 v1.4:
45 -Updated for 1.7 patch
46 -Updated the hook handler to match current Sea version in the since that it properly returns for normal functions, as well as handles event hooks
47 -Added anyupdate which works like update and noupdate, but occurs whether or not the variable was updated, on an attempted update
48 -Fixed Khaos optionset registration to work as it should. You can now pass MCom options in the initial registration of a khaos optionset, and those options will be applied to all options in the khaos optionset
49 -Opacity values will now show as 100% if they are nil
50 -Fixed MCOM_CHOICET/K_PULLDOWN to work properly now
51 -Added default Khaos feedback messages for all option types
52 -Fixed ability to pass uisetup
53 -Slider min and max are now only set if the option is a slider type
54 -Added ability to set an unput box's callOn, via uicallon
55 -addSlashCom and addSlashSubCom now accept min and max values for display purposes for numbers
56 -textFrame will now default to having a black background if no material is passed, this also applies to the help and slashcommand list display, should be easier to read now
57 -Slash command help will now display the minimum and maximum values of number options
58 -number and choice types will now show valid examples if available
59 -Added a couple more Sea wrapper functions to handle some of the new stuff:
60 MCom.math.hexFromInt, MCom.string.colorToString
61 -Fixed a bug in updateUI that would make it not work when updating a single subcommand
62 -Fixed importing of difficulty from a Khaos option
63 v1.37:
64 -cominmul will now be set based on commul if commul was passed and cominmul was not
65 -If a Cosmos option type is passed in to a Khaos setup, if no func was passed but uifunc was, a func for slash commands will be generated using the uifunc
66 v1.36:
67 -UISection was being improperly handled in the case of imported Cosmos options, this is fixed now.
68 v1.35:
69 -The list of safeLoad configs will now be deleted once no longer needed
70 v1.34:
71 -Added a new function safeLoad, which will store the current table based config variable as defaults, and will then load in the these defaults to any entries that got set to nil on VARIABLES_LOADED
72 -German localization has been updated thanks to StarDust
73 v1.33
74 -Help button will now inherit difficulty from the option it is registered with.
75 v1.32
76 -Updated to 1600
77 -New function registerVarsLoaded, replacement for registerForLoad. The new function will call the callback passed whether there is a UI or not, and will pass what method of load occured.
78 -registerForLoad, and varsLoaded are now depricated
79 -Improved the appearance of the help screen, by changing the default look to "Stone"
80 -Added textname to smartRegister, used to specify the name to show in slash command output. This can be used instead of textbool, textnum, etc...
81 -commul will now properly effect display of slash output
82 -commul added to slash command registration
83 -Added ability to choose the material for textFrame(changes the look of the frame, default is now stone instead of parchment)
84 -Added ability to choose the scaling of the text in textFrame, defaults to 85% normal size
85 -frameStatus now properly handles being closed
86 -Localized On/Off in slash commands
87 -The slash command help will now show the current state of all sub slash commands, and is also reformated in what is hopefully an easier to read form
88 -In the case that a command was registered, without registering for Cosmos at the same time, the uivar did not get properly converted to have COS_ in it, in the case that it didn't already have it. This is now fixed, so long as Cosmos is found, and Khaos is not, COS_ will be added to uivar if it isn't there.
89 -Added defaults for uimul and commul
90 -Improved slash command help
91 -Added textshow to registerSmart, if true, then the text will be printed even if there is a UI
92 -printStatus now has an extra argument, show, if true, then the text will be printed even if there is a UI
93 -Added callHook, runs the origional of a hooked function
94 -Added missing MCom.util.hookHandler, Sea wrapper, and revamped hook wrappers
95 -Updated to use Legorols new string variable code, and split code, when it isn't evailable in Sea. Instead of my code that required storing of the functions, for GC efficiency
96 -Renamed stringToVar to getStringVar for consistancy, stringToVar is still available as an alias, for comptability
97 -Added support for myAddOns
98 -stringToVar and setStringVar now have an option to store the function, for improved GC handling
99 v1.23
100 -Improved stringToVar and setStringVar
101 -Added stringVarToGetFunc and stringVarToSetFunc, which are like stringToVar and setStringVar, but instead, they return a function, that you can call to get or set. The reason for this is that origional functions have to generate GCs.. while the functions the new functions returns, don't. So you use these functions to get function, and store those functions and use them. I think I explained this better in the code comments.
102 v1.22:
103 -Fixed bugs with registering for load in Khaos
104 -Added a new function textFrame which displays the passed text in a multipage scrollable dialog
105 -Slash command help is now shown in a dialog
106 -Added ability to pass info for setting up a help dialog to smartRegister, see infotext
107 v1.1:
108 -Fixed a few bugs here and there, mostly with slash commands, and slash command output.
109 -Added a set of functions to facilatate in storing/loading variables on a per realm, per character basis, for when no UI is available. The functions are designed with the notion that it's best to use the UI if it is there, and have convience to avoid messing with any UI behavior. It for instance makes it very simple to not even load any vars at all if the UI isn't around. Any mod that uses this, has to do the registering and waiting for correct data, and calling the storage and loading, etc themselves, this is not a full on system, just convience functions.