Solved

Problems using OpenSheetWithParm...

Posted on 2001-08-28
5
1,188 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
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.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

914 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

20 Experts available now in Live!

Get 1:1 Help Now