Newbies Leo Charette Posted March 3, 2010 Newbies Posted March 3, 2010 (edited) Hi Folks, I have a database solution that generates windows to edit records in related tables. I need to manage the window clutter that this can generate. I don't think my script solution below is very efficient at handling this. There has got to be a way to reuse a window and still be able open a related record. How do you handle this? I know I'm just forgetting something simple. Thanks for your help. Cheers, LC Script Name: WindowClutterManager Set Error Capture [ On ] If [ Get ( ScriptParameter ) = 1 ] Set Variable [ $$window_name; Value:"Purchase Details" ] Select Window [ Name: $$window_name; Current file ] If [ Get ( LastError ) = 0 ] Close Window [ Current Window ] End If New Window [ Name: $$window_name ] Go to Related Record [ From table: “Sales”; Using layout: “Sales” (Sales) ] Else If [ Get ( ScriptParameter ) = 2 ] Set Variable [ $$window_name; Value:"Event Details" ] Select Window [ Name: $$window_name; Current file ] If [ Get ( LastError ) = 0 ] Close Window [ Current Window ] End If New Window [ Name: $$window_name ] Go to Related Record [ From table: “Art Show Details”; Using layout: “Art Show Details” (Art Show Details) ] End If Adjust Window [ Resize to Fit ] Move/Resize Window [ Current Window; Top: (Get ( WindowDesktopHeight ) / 2) - (Get ( WindowContentHeight ) / 2); Left: (Get ( WindowDesktopWidth ) / 2) - (Get ( WindowWidth ) / 2) ] Exit Script [ ] Edited March 3, 2010 by Guest
David Jondreau Posted March 3, 2010 Posted March 3, 2010 Your method seems fine. But to do what you're asking, you could use a Find[] rather than GTRR[]. Personally, I like to use a single window for most things (excepting modal dialogs). Since, most of my solutions are cross platform, though, I do use an "cmd" option to open new windows for Mac users. Also, I'd use $ vars rather than $$ vars and there's no need for an Exit Script[].
Newbies Leo Charette Posted March 3, 2010 Author Newbies Posted March 3, 2010 DJ Thanks for your reply. I will move to FIND. Interesting comment about confining design to a single window. I gather that by opening multiple windows I will restrict cross platform use. I do want this to work across MAC and PC platforms. Cheers, Leo
David Jondreau Posted March 3, 2010 Posted March 3, 2010 No, not restricting. But I find Windows users are more comfortable with single windows and Mac users with multiple windows.
Recommended Posts
This topic is 5379 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