?
Solved

Problems using OpenSheetWithParm...

Posted on 2001-08-28
5
Medium Priority
?
1,306 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 400 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
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 NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month11 days, 11 hours left to enroll

752 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