Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Modal Forms

Modal Forms

Discuss OrbForms Designer and PocketC Architect

Postby Ringmaster on Thu May 02, 2002 11:36 am

I want to use a modal form to collect data. For example, in my main form I have a New button. I want to click the New button to pop up a modal form, enter data, then return to the original form where some of that data will be displayed.

The only way I can see to begin this would be to use global variables to store the data entered on the modal form (since you can't access a form's controls when it's not active), which defies my OOP sensibilities, but I'll get over it.

However, my main concern is how I get the main form to display the data after the modal form is through. Launching the modal form "clears" the main form. It returns to the main form, but there doesn't seem to be a way to know when the modal form was closed.

It would also be convenient to have the modal form close directly to a new form, or to load a new form after it returns to the main form form the modal one.
Ringmaster
 
Posts: 11
Joined: Tue Mar 19, 2002 2:49 am

Postby mbeattie on Fri May 03, 2002 11:52 pm

I had the same problem. You will have to use a global variable but I solved my data transfer to the original form in the following way. Make sure that the data collection form is MODAL and is opened using "domodal" by the calling form. Then from the data collection form, on your form closing handler: 1st move all data to global variables, then use <formname>.close to close the form, then before ending the handler copy the data to the now active, calling form. ie:

string tmp;

handler returnButton.onselect() {
//TODO: handle event

tmp=entryfield.text;
testForm.close();

resultfield.text = tmp;
/*resultfield is defined in the calling form.*/

}

It took me a while to figure it out, but your routine will continue even after the form is closed. Since the calling form was never closed it is immediately active. This method will not work if you use non modal forms opened with <formname>.load(). In this case the form is apparently closed and is not reopened by the time your variable transfer code executes.
--Martin
mbeattie
 
Posts: 5
Joined: Tue Apr 10, 2001 7:45 pm
Location: USA

Postby mbeattie on Sat May 04, 2002 12:30 am

Sorry, I was incorrect in my first response. You don't need global variables but you do need local variables in the form closing handler. ie-

handler returnButton.onselect() {
//TODO: handle event

string tmp;

tmp=entryfield.text;
testForm.close();

/* now the calling form is active */

resultfield.text = tmp;

/*resultfield is defined in the calling form.*/

}

Martin
mbeattie
 
Posts: 5
Joined: Tue Apr 10, 2001 7:45 pm
Location: USA

Postby Ringmaster on Sun May 05, 2002 1:07 am

Aha! That makes sense. (Albeit, in a very weird way.) I'll give that a go.

Thanks!
Ringmaster
 
Posts: 11
Joined: Tue Mar 19, 2002 2:49 am


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 3 guests

cron