Ace3 - reset a namespace DB to default?
1 Attachment(s)
Reading through the docs of AceDB-3.0, I see that namespaces are considered full databases except that they cannot control their options, a parent addon does that. All is well and good, although when I reset the profile in the main addon, the module's options do not reset at the same time.
I am missing something, but I don't know what. Attached is the full zip of the addon in progress, which includes the module code. When I look at the SV file, I see the namespace "Chat". Nothing appears in there; any changes appear under profiles - default, and I'm getting confused. Am I adding the module options correctly? How do I reset the module back to the namespace defaults when I reset the profile? |
This still doesn't make any sense to me. I see no API to register module options; I do see two to register module defaults. When I try to register the module options, I get the error telling me that the module is already registered, presumably when I registered the namespace. How then do I assign the options? Is this done with AceConfig, with appName being the module name? If that is true, which I'm not sure about, will doing so merge the module options with the core options?
addon is defined in the core file, and module is defined in the module file. This chunk is from the core file. Lua Code:
This chunk is in the module file. Lua Code:
And after all of that, how do I reset the module when the profile is reset via the core file? |
I have tried every idea that I can think of, and am still stuck. I am getting the following error, which I cannot decipher.
Lua Code:
Besides the error, some things do not make sense to me. I have looked at Skada and its modules for inspiration, yet things are going sideways.
|
After throwing enough darts blindly, I got it working. https://github.com/Myrroddin/smartres2 Now to break it again by adding more options!
|
All times are GMT -6. The time now is 10:40 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI