Solved

Problems using OpenSheetWithParm...

Posted on 2001-08-28
5
1,168 Views
Last Modified: 2013-12-26
Lets say one have a table in a database containing some names of an application windows
(w_about, w_splash, ...), and one wants to open these windows in run time using the function OpenSheetWithParm.

Well, it seems that the named function don't allows the use of a var containg the name of the window, ?How can I do such thing????

Please help me asap. Thank you.
0
Comment
Question by:Miguel_Angel
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:Bhatti
ID: 6431183
Try it,

These statements open a window of the type specified in the string s_w_name and store the reference to the window in the variable w_to_open. The script gets the value of s_w_name, the type of window to open, from the database. The parameter in e_location is text, so it is stored in Message.StringParm:

window w_to_open

string s_w_name, e_location
e_location = sle_location.Text
SELECT next_window INTO :s_w_name
FROM routing_table
WHERE ... ;
OpenWithParm(w_to_open, e_location, s_w_name, w_mainframe)
0
 
LVL 4

Accepted Solution

by:
Bhatti earned 100 total points
ID: 6431214
Sorry!

I wrote OpenWithParm please take OpenSheetwithparm()

window w_to_open

string s_w_name, e_location

e_location = sle_location.Text

SELECT next_window INTO :s_w_name
FROM routing_table
WHERE ... ;

OpenSheetWithParm(w_to_open, e_location, s_w_name, w_mainframe)

First parameter is local declared window variable
Second is the parm (string , double or object what you have)
Third is the name of the window as string getting from database
Fourth is name of the mainframe (MDI) window
0
 

Author Comment

by:Miguel_Angel
ID: 6432295
GREAT!, thank you very much!
Quick and easy!
0
 

Author Comment

by:Miguel_Angel
ID: 6432405
ONE MORE THING PLEASE (oh, im so bad)

If i put this code in a loop, opening many windows, how can i wait one window to be closed for the next one to be opened??? (sorry for my english, im espa?ol)

Thank you in advance, Bhatti
0
 
LVL 4

Expert Comment

by:Bhatti
ID: 6432673
Hello Miquel Angel,

When application opens a First window from the loop then user works on it and close the window.

I don't know is it so or in a loop to open a many windows. If user work on first window and close the window
you should write some variable in the closewithreturn() function that may be the name of the next window you want to open and use this windowname as string in opensheetwithparm() function and if closewithreturn() return you some string say "end", then no more window to open.

//Hier select in the close event of the window to put the next window name in string to open.
Select the name window name you want to open when user close this window.


CloseWithReturn(w_window_name, "w_next_windowname")

s_w_name = Message.StringParm

OpenSheetWithParm(w_to_open, e_location, s_w_name, w_mainframe)



If it is not so let me know concrete.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now