Admittedly, I am just now starting to work more fervently with FileMaker 12. I was doing just that yesterday when I ran into an odd behavior that may or may not be a bug, but I wanted to get some feedback from the forum members on. ie, has anyone else seen it and how did you deal with it.
FileMaker Pro 12 Advanced.
I used custom menus to script the Close menu item. For the sake of testing, I made the script that the Close menu item calls a single step: Close Window[Current Window].
Two windows open and visible by the user, Window A and Window B.
If the active window is Window A and the user clicks on the "X" in the upper right corner of Window B to close it, the script fires off but closes Window A. Not quite what a user would expect to happen.
Here's something else that is very strange. I added a step to the Close script that sets a variable to Get(WindowName) just before the Close Window[Current Window] step. I then added Get(WindowName) to the "Watch" tab in the Data Viewer and started the debugger.
I then reproduced the scenario above and stepped through the steps. After setting the variable, I checked the Data Viewer. The variable held the name of Window A and the Get(WindowName) function in the "Watch" tab of the Data Viewer showed the name of Window B.
This problem does not exist in any .fp7 version of FileMaker.
Obviously, selecting Window B first and then clicking it's close button works to close Window B. User could be trained to do that, but it's not intuitive and will lead to windows being closed unintentionally.
So, what do you think? Is this a bug in FileMaker 12 or intended behavior? Has anyone out there dealt with this?