Skip to main content
K.Daube
Community Expert
Community Expert
August 28, 2022
Question

Question about window.close()

  • August 28, 2022
  • 2 replies
  • 242 views

Hi friends and experts, in particular ScriptUI guru Peter Kahrel:

In my script FMfindRepl (for FrameMaker) I have noticed that win.close() 

  • closes the palette window
  • leaves its status active
  • any Nofify reaction addressing an element of the UI will re-open the panel.

Hence I have changed in the Notify function

if (wPalF.active) { ..

to

If (wPalF.visible) { ...

 IMHO close() should inactivate a window - but there are comments in various forums about the close() issue which lets me assume that something is incorrect with this method.

→ What is your opinion/knwledge about this issue?

This topic has been closed for replies.

2 replies

Community Expert
October 20, 2022

Probably tagging @Peter Kahrel would be a good idea to notify him that there is call for help. I have not worked on Framemaker and did not have much to work with the close method apart from using it just for what it should do so I have nothing much to add here.

-Manan

-Manan
K.Daube
Community Expert
K.DaubeCommunity ExpertAuthor
Community Expert
October 20, 2022

Peter Kahrel obviously did not have time to answer my question - or it was to trivial...

I ended up in testing in the Notify function:

if (typeof wPalF == "object") {
  ...
}

This distinguishes whether the panel still exists and can be handled (in the background?) or actually has been closed.

Community Expert
October 20, 2022

You can use the @ symbol to send a notification to someone if you require their assistance in a thread. 

Community Expert
October 20, 2022

Hi

 

Did you manage to find the answer?