Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5433 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi All -

I'm just curious to see if anyone has had to deal with behavior changes in their solutions with regards to the new way that FM10 handles target windows in scripts.

The following Knowledge Base article outlines the changes: KBArticle

I ran into a problem almost immediately when I opened one of my solutions in FM10. I use a multi-window user interface and resize the windows to fill the screen next to one another. As soon as I opened my solution the windows didn't size properly at all.

I tracked it down to the script I use for sizing the windows. I was simply looping through the list of windows and resizing them using the Move/Resize Window script step. At no time was I using the Select Window step to select the window before resizing each window. The Move/Resize Window step allows you to specify the target window for that step dynamically via a calculation or script variable. That step also makes the window being moved/resized the front most window. So, in FM9, if you followed that step up with a step that sets a variable to Get(WindowWidth) it would return the front most window's(aka the window that was just moved/resized) width.

In FM10, however, the script doesn't automatically target the front most window. Instead, until either the Select Window, New Window, or Close Window step is used, the script targets the window that was the current window when the script was triggered.

So, because I was not using Select Window before each Move/Resize Window step, the script was returning the width of the window that was the current window when the script was triggered instead of the front most window.

I'd love to hear of any other developer's challenges with this. I need to go through my solution and make sure there isn't any other spots that might fall prey to this and feedback from other developer's may point me towards spots that I wouldn't have considered previously.

Thanks all!

Posted

Thanks for drawing attention to this.

I'll add one thing that's not new to FM10, but along the same lines:

GTRR (go to related record) when used in a script to target a related file, will not bring that file's window to the front.

However, GTRR when used as a script step applied to a button (i.e. not a script) will bring it to the front.

I had a "need more coffee" moment with this the other day.

This topic is 5433 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.