Weird behaviour of palette
Dear wise women and men:
My script FMfindReplace opens a palette wPalF via menu or short cut. The scipt is started either via the Script Library or by placing it in the Statup folder.
- I have several documents open and invoke the script via ESC q f
- It works as intended on document A, Notify reacts and does was it should, all OK
- I close the palette via the Exit button top right or via the button OK/Done
- Now I switch to another document B and the palette re-appears! Console log (see Notify hereafter): wPalF.active = true
- I close the palette and give focus to another application (test editor) and then come back to the document B
- Now the palette is really gone and for further work with it I invoke it with the short cut... (Console log: wPalF.active = false).
I do not understand why the palette re-appears in step 4. I have not observed such behaviour in any other of my scripts with palettes...
The Notify function is IMHO streight forward:
case Constants.FA_Note_PostActiveDocChange:
if (object.ObjectValid()) { // change of document
KLD_F.oCurrentDoc = object;
Console ("wPalF.active = " + wPalF.active);
if (wPalF.active) {
KLD_F.bDocActive = true;
KLD_F.bBookActive = false;
wPalF.g07.rbDoc.value = true;
KLD_F.ButtonReset();
}
}
There exist notification constants for which no explanations are in the FDK documentation:
FA_Note_Dialog (84); FA_Note_Alert (85); FA_Note_Palette (86); ... FA_Note_FileOpen (94)
For curiosity I set up notification for FA_Note_Palette - it did not trigger during my actions.
positive
The palette also re-appears if I open another palette defined by scripts in Statup.

