User forums > Help

Problem with $(ACTIVE_EDITOR_FILENAME) in Tools

<< < (2/2)

thomas:
Hmm... are you sure this ever worked? :shock:

ToolsManager::Execute() contains the lines:
    // hack to force-update macros
    Manager::Get()->GetMacrosManager()->RecalcVars(0, 0, 0);



... but RecalcVars(0, 0, 0) really runs:
    if(!editor)
    {
        m_ActiveEditorFilename = wxEmptyString;
        m_lastEditor = NULL;
    }
RecalcVars(0, 0, 0) does not reload anything. It's been like that for ages (revision 1497, December 2005), so I could not imagine that $(ACTIVE_EDITOR_NAME) ever worked correctly in tools, under that premise...
I'll try what happens if the behaviour of RecalcVars(0, 0, 0) is changed to reload the current editor/project name (if any). Should not do any harm (hopefully).

thomas:
Right... it does work. Now I remember, it's that terribly complicated thing with setting everything to zero, so it updates on the next call to ReplaceMacros()... all is fine. No changes necessary.

The reason why it still did not work was because I was using $(ACTIVE_EDITOR_NAME), not $(ACTIVE_EDITOR_FILENAME) to test... of course that one will always be empty. Stupid me :)

So I guess one can consider the issue resolved.

Pecan:
Again, thank you thomas.
Works fine.

Navigation

[0] Message Index

[*] Previous page

Go to full version