MuonDude Posted August 24, 2006 Posted August 24, 2006 I read the documentation on the "Freeze Window" script step provided by FMI and in the Scott Love, et al., book FM 8 Functions and Scripts (page 301). The Love books says that you can navigate to a utility layout and return to the "main" or original layout and the user won't see the the window change while this is happening. So I wrote a test script (see below) that switches between two layouts, Main1 and Main2 and uses the Freeze Window step. I added some pause steps to see what is happening and sure enough, the window does NOT freeze. What am I not understanding? TAI --Sam I'm using FM 8.5 Advanced on Mac OS 10.4.7 --- TEST Script --- Go to Layout [ “Main1” (Main1) ] # Set Field [ Main1::x; "" ] Set Field [ Main1::y; "" ] Set Field [ Main1::z; "" ] # Freeze Window # Go to Layout [ “Main2” (Main2) ] Enter Browse Mode # Pause/Resume Script [ Duration (seconds):/ 1 ] Set Field [ Main2::x; "Test 1" ] Pause/Resume Script [ Duration (seconds): 1 ] Set Field [ Main2::y; "Test 2" ] Pause/Resume Script [ Duration (seconds): 1 ] Set Field [ Main2::z; "Test 3" ] Pause/Resume Script [ Duration (seconds): 1 ] # Enter Browse Mode Go to Layout [ “Main1” (Main1) ] Refresh Window
CCBtx Posted August 24, 2006 Posted August 24, 2006 I'm going to love hearing the answer on this one. Same problem.
comment Posted August 24, 2006 Posted August 24, 2006 It's a classic case of observation interfering with the test results. When you pause a script, Filemaker assumes you do it to give the user a chance to enter some data. So the current layout is presented to the user. Get rid of the pauses, and the window will stay frozen on the original layout. In order to test this, you could use Set Field[] with a complex calculation (a custom function, for example) - see attached. BTW, Enter Browse Mode is entirely redundant when you already ARE in Browse mode. Freeze.fp7.zip
MuonDude Posted August 24, 2006 Author Posted August 24, 2006 Thanks. I figured it had to be something "simple"! I noticed that your sample file "New Script" doesn't even have a "Freeze Window" step, yet you switch to the Child Layout, Set Fields, then switch back to the Parent Layout, with out the window changing. Why did that work? TIA
comment Posted August 24, 2006 Posted August 24, 2006 Yes, I forgot to freeze the window, but it just illustrates the point: Redrawing the window is a lot of work, and Filemaker is a lazy application. It only refreshes when *it* thinks something happened that justifies the effort.
MuonDude Posted August 25, 2006 Author Posted August 25, 2006 Thanks very much for the feedback and help. This seems to be the only way to learn many of the "undocumented" features in FMP. It would be "nice" if books such the FM8 function & script deskref by Love et al, would go beyond just repeating what is already in the documentation. regards...
Niet32 Posted September 20, 2006 Posted September 20, 2006 I have Freeze Window in ascript that runs several scripts. Each script also contains the Freeze Window. The problem is when the sorting records window pops up and then disappears it leaves a white box (looks like it hs erased whatever is behind it). Is there anything I can do to fix that? Thanks
Recommended Posts
This topic is 6987 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 accountSign in
Already have an account? Sign in here.
Sign In Now