ISXEQChatWnd doesn't create it's XML settings file, or save it's window settings (position, etc) even if I create an empty ISXEQChatWnd.xml file myself.
This is using echoism's pre-compiled ISXEQ modules.
Moderator: MacroQuest Developers
Code: Select all
78a79,87
> else if (pWnd==(CXWnd*)OutputBox)
> {
> if (Message==XWM_NEWVALUE)
> {
> SaveChatToXML((PCSIDLWND)MQChatWnd);
> }
> else
> DebugSpew("OutputBox message %Xh, value: %Xh", Message, unknown);
> }Incorrect. The XML filename is set up before any of the ISXInterface Initialize function gets called, to use the containing folder of the extension. The issue is actually that you need to open the settings file before using it, which ISXEQTemplate.cpp doesn't do.If you create an .iss to load your extensions, and you call it during the Startup Sequence, the directory for ISInterface->SaveSettings() seems to be undefined or at least not either of ISDIR or ISDIR/extensions/
In other words, if I have it load the extension during Startup Sequence, no XML files get saved/found/loaded by any of the extensions (at least, if I load them via an .iss file. I'll try loading them via individual ext commands in the startup sequence next.)
http://www.lavishsoft.com/wiki/index.ph ... ting_FilesI couldn't find any sample code that covered the basic sequence, and the Wiki examples were simple one-line examples of the function calls, which, frankly, are essentially repeating the function decleration, and don't actually serve to demonstrate usage.
That is indeed a proper solution. The settings file does not need to be saved on unload at all, only when changes are made.First, the current code only saves the settings during shutdown, if the font is changed or during cleanup (when the window is being closed).
However, unless you explicitely ext -unload, by the time shutdown is called, the window no longer exists so the settings don't get saved.
So I added the following code to force a save every time the window is re-sized.
Just out of curiousity, why does it work when I setup a "Startup Sequence" item for each extension individually, but doesn't work when I have a single "Startup Sequence" item calling 'runscript loadisxeq.iss'? It also works if I don't have any startup sequence items setup, and then call runscript loadisxeq.iss from the console once in-game.Lax wrote:Incorrect. The XML filename is set up before any of the ISXInterface Initialize function gets called, to use the containing folder of the extension. The issue is actually that you need to open the settings file before using it, which ISXEQTemplate.cpp doesn't do.
My bad! I scrolled too fast past the "Tutorials" part, didn't even see it, and went straight to the "Classes" -> "ISInterface" section. Thanks for pointing it out. When I've got time (assuming someone else doesn't beat me to it) I'll update the various ISXEQ modules to use the new XML Settings API instead of the deprecated one.http://www.lavishsoft.com/wiki/index.ph ... ting_Files
The full documentation for the settings API will be found under the LavishSettings topic on the Lavish wiki, I just need to get around to filling it in.
Does this mean you'll add my patch to .cvs ? :)That is indeed a proper solution. The settings file does not need to be saved on unload at all, only when changes are made.
Totally depends on the extensions and how they are designed. If extensions use the default layout for loading settings, and use character-specific settings, then you better be in game when they're loaded. If they use the gamestate to properly load character-specific settings once you actually have a character loaded, then no problem. ISXEQChatWnd SHOULD work properly, but might not.Just out of curiousity, why does it work when I setup a "Startup Sequence" item for each extension individually, but doesn't work when I have a single "Startup Sequence" item calling 'runscript loadisxeq.iss'? It also works if I don't have any startup sequence items setup, and then call runscript loadisxeq.iss from the console once in-game.
In other words, it only stops working if I try to load the extensions via a script during the startup sequence. Clearly I don't understand all the inner workings, but that seems odd to me.
Sure.Does this mean you'll add my patch to .cvs ? :)