Thread: Adjust Window: Hide Not Working
-
01-28-2009 01:45 PM #1Guest Member
- Join Date
- Sep 2008
- Posts
- 13
- Location:
- Harpers Ferry, WV
- FM Version
- FM 6/7/8/9, Server 9
- Skill Level
- Intermediate
- OS
- Windows & Mac
- Rep Power
- 0
Adjust Window: Hide Not Working
Okay, I know that the "active" window has changed significantly from FM < 7 to FM => 7.
The solution that I've had in place since 1991 for a company is causing me lots of headaches. The navigation is via a "Main Menu" that I setup. There is a common "Button Bar" across the top of every file (table/db/whatever you want to call it) used to navigate the 27 files in the solution.
Previously, I had the navigation scripts in each file. The steps were simple: I had a Goto Main Menu script that would hide itself and then execute the script in Main Menu to go to the appropriate layout. WORKED GREAT! It kept the screen clean and only 1 file was visible at a time.
After the upgrade to FM 9, I decided to change the navigation buttons to execute the scripts directly in Main Menu (since it's now allowed to do that) and will delete all of the navigation scripts in the other 26 files (once all is working). The issue though is that I can't hide the original window.
I've been fighting with this for months. My solution to get the upgrade done and deployed was to use the close window script step. The issue with this now is that the user is complaining that when they navigate away from one file and then go back, they are back at the first record so I need to fix this.
Here's what I've tried to troubleshoot what's going on. I have my Goto xxxxx script setup to call a Hide Current Window script so that I can edit that easily and not have to change all of the other navigation scripts. In there, I displayed a custom dialogue to show me the current window name, state, etc. As suspected, all shows the Main Menu because that is where the script is executing from. Not a problem so far.
I have a global that contains the name of the DB that the user last navigated to, Patients for example. So I tried using the Adjust Window: Hide step using the name as defined in the global. I included the value of this global in the custom dialogue so I could be sure it was accurately reflecting the file/window I wanted to hide and it is.
So now the script displays the dialogue, selects the window based on the global and then attempts to hide with the Adjust Window: Hide step. The problem is, it does not get hidden. If I manually hide the window from the menu, the name shows up in the Show Window menu. When I run this script, it is still visible on the screen and in the main Windows menu.
Any help? Anyone else find a workaround for this? I'd hate to have to write a bunch of scripts to manage what record a user was currently on when they leave a db and then go back to that record when they re-enter it.
All this is on Macs running OSX 10.4 and 10.5 and the server is FM Server 9 on a OSX 10.5 box as well.
Thanks for any insight, thoughts, condolences, solutions, flowers, beer, etc.
-
01-28-2009 02:10 PM #2Super Moderator
- Join Date
- May 2004
- Posts
- 3,258
- Location:
- Minneapolis, MN
- FM Version
- 11 Advanced, Server 10
- Skill Level
- Developer
- OS
- Mac
- Rep Power
- 71
Re: Adjust Window: Hide Not Working
You'll need to use a subscript in each file to hide that file's window. Then the main menu will need to perform the subscript in the appriopriate file.
-
01-28-2009 02:57 PM #3Guest Member
- Join Date
- Sep 2008
- Posts
- 13
- Location:
- Harpers Ferry, WV
- FM Version
- FM 6/7/8/9, Server 9
- Skill Level
- Intermediate
- OS
- Windows & Mac
- Rep Power
- 0
Re: Adjust Window: Hide Not Working
Why? If I have the window that I wanted selected as the active window and execute the "Adjust Window:Hide" command from a script, what difference does it make where the script is executing from?
Am I missing something? When the dialogue shows the second time (after the select), the window that I want to hide is in front. So executing the "Adjust Window:Hide" should hide that window correct?Code:Allow User Abort [ Off ] Select Window [ Current Window ] Show Custom Dialog [ Message: "G_DB_NAME = " & ST_MainMenu::G_DB_NAME & ¶ & "Filename = " & Get(FileName) & ¶ & "Layout Name = " & Get(LayoutName) & ¶ & "Window Name = " & Get(WindowName) & ¶ & "Window Visible = " & Get(WindowVisible); Buttons: “OK”, “Cancel” ] Select Window [ Name: ST_MainMenu::G_DB_NAME ] Show Custom Dialog [ Message: "G_DB_NAME = " & ST_MainMenu::G_DB_NAME & ¶ & "Filename = " & Get(FileName) & ¶ & "Layout Name = " & Get(LayoutName) & ¶ & "Window Name = " & Get(WindowName) & ¶ & "Window Visible = " & Get(WindowVisible); Buttons: “OK”, “Cancel” ] Adjust Window [ Hide ] Show Custom Dialog [ Message: "G_DB_NAME = " & ST_MainMenu::G_DB_NAME & ¶ & "Filename = " & Get(FileName) & ¶ & "Layout Name = " & Get(LayoutName) & ¶ & "Window Name = " & Get(WindowName) & ¶ & "Window Visible = " & Get(WindowVisible); Buttons: “OK”, “Cancel” ]
If not, and, as you say, I need to code that into every file, then is there a way to call the appropriate file's script based on my global? I'm not going to write a huge if/then/else trail to handle all of the possible navigation from any file to any other file. That would be a nightmare!
Thanks for the input!!!! Just hope there is a better way. Otherwise, I'll just leave all the windows open for now and wait until FM or someone fixes this.
-
01-29-2009 06:54 PM #4Guest Member
- Join Date
- Sep 2008
- Posts
- 13
- Location:
- Harpers Ferry, WV
- FM Version
- FM 6/7/8/9, Server 9
- Skill Level
- Intermediate
- OS
- Windows & Mac
- Rep Power
- 0
Re: Adjust Window: Hide Not Working
Noone else has any ideas? I can't imagine I'm the only one who has run into this in migrating from <7 to 9.
Thanks!!!!!
-
02-03-2009 10:24 AM #5Guest Member
- Join Date
- Sep 2008
- Posts
- 13
- Location:
- Harpers Ferry, WV
- FM Version
- FM 6/7/8/9, Server 9
- Skill Level
- Intermediate
- OS
- Windows & Mac
- Rep Power
- 0
Re: Adjust Window: Hide Not Working
;(
Bump
;(
-
02-03-2009 10:57 AM #6Super Moderator
- Join Date
- May 2004
- Posts
- 3,258
- Location:
- Minneapolis, MN
- FM Version
- 11 Advanced, Server 10
- Skill Level
- Developer
- OS
- Mac
- Rep Power
- 71
Re: Adjust Window: Hide Not Working
You have my answer.
Most script operations only act on layouts/windows of the file the script resides in. Select Window[] can select other windows, but that doesn't change the focus of the script.
If you want a multi-window solution that can be controlled with fewer scripts, put everything in one file (though this may not be desireable for large solutions).
-
02-03-2009 11:01 AM #7Guest Member
- Join Date
- Sep 2008
- Posts
- 13
- Location:
- Harpers Ferry, WV
- FM Version
- FM 6/7/8/9, Server 9
- Skill Level
- Intermediate
- OS
- Windows & Mac
- Rep Power
- 0
Re: Adjust Window: Hide Not Working
So if my main navigation is all in the MainMenu, is there a way to call a script from another file via a global?
The dilema is that the user could have navigated from any of the 30 files. I know where they were as that is stored in a global. What I don't know is can I use that global to call the "Hide Window" script in that particular file?
Thanks!!!!
-
02-03-2009 11:07 AM #8Super Moderator
- Join Date
- May 2004
- Posts
- 3,258
- Location:
- Minneapolis, MN
- FM Version
- 11 Advanced, Server 10
- Skill Level
- Developer
- OS
- Mac
- Rep Power
- 71
Re: Adjust Window: Hide Not Working
Just use a big If[]-Else If[] branching script in the main file. It's really not that hard, just a little tedious.
-
02-03-2009 11:12 AM #9Guest Member
- Join Date
- Sep 2008
- Posts
- 13
- Location:
- Harpers Ferry, WV
- FM Version
- FM 6/7/8/9, Server 9
- Skill Level
- Intermediate
- OS
- Windows & Mac
- Rep Power
- 0
Re: Adjust Window: Hide Not Working
That's what I was looking at. It just becomes very tedious if files are changed in the solution.
Maybe I'll go back to having the navigation initiated from the current db as the Hide step should work there or will it still return to that "window" and show it to finish the script execution even if the last script step was to execute a script in MainMenu?
Thanks!!!!
-
02-03-2009 11:34 AM #10Super Moderator
- Join Date
- May 2004
- Posts
- 3,258
- Location:
- Minneapolis, MN
- FM Version
- 11 Advanced, Server 10
- Skill Level
- Developer
- OS
- Mac
- Rep Power
- 71
Re: Adjust Window: Hide Not Working
This is how I handle such file hops with a main file in between:
File:
Main Menu
Contacts
Inventory
The Main Menu has navigation script(s) to each other file.
To jump from Contacts to Inventory directly, a script in Contacts would need to call the navigation script in Main Menu which calls a script in Inventory. You can use different scripts for possible destination file, or use your global idea; maybe have the user select a destination in a pop-up menu directly, then hit a button to jump to the chosen file.
The structure of the scripts in Contacts looks like this:
Go to Layout[blank]
Adjust Window[Hide]
Perform Script["Go to File by Selection" from file: "Main Menu"]
The script in Main Menu might look like this:
Adjust Window[Hide]
If[gSelectedDestination = "Inventory"]
Perform Script["Go to Inventory Menu" from file: "Inventory"]
Select Window[Inventory]
Else If[[gSelectedDestination = "Contacts"]
Perform Script["Go to Contacts List" from file: "Contacts"]
Select Window[Contacts]
Else If[...
...
End If
The scripts in the destination files might simply be
Go to Layout[Inventory menu]
or they might be more complex.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads - The answer to your question may be in one of these posts!
-
Adjust window [resize to fit] - new monitor issue
By Coltom in forum FileMaker Pro 10Replies: 3Last Post: 09-08-2009, 12:15 PM -
Adjust Window [Resize to fit] - why does window move as well?
By Coltom in forum FileMaker Pro 10Replies: 1Last Post: 07-03-2009, 01:38 PM -
Adjust the Filemaker app window to fit?
By NickS in forum The Ray Cologon FilesReplies: 5Last Post: 02-19-2007, 11:44 AM -
Adjust the Filemaker app window to fit?
By NickS in forum FileMaker DeveloperReplies: 5Last Post: 02-19-2007, 11:44 AM -
hide window techniques
By xtrim in forum Passwords and SecurityReplies: 1Last Post: 01-29-2003, 10:36 AM

























































Reply With Quote

Bookmarks