I write a piece of script to get the filename in the active editor as following:
local edman = GetEditorManager();
if (IsNull(edman))
{
ShowError(_("Could not query the Editor manager. Cannot continue."));
return 0;
}
local editor = edman.GetActiveEditor();
if (IsNull(editor))
{
ShowError(_("No active editor. Cannot continue."));
return 0;
}
local fname = editor.GetFileName(); //??
ShowInfo(fname);
It is very simple, however, I got the following message in running:
OnScriptMenu:the index 'GetFileName' does not existI carefully read the Scripting commands (
https://wiki.codeblocks.org/index.php/Scripting_commands),
but still don't understand why this happens. Does the command deprecated?