1. return statement

This is a multi-part message in MIME format.

------=_NextPart_000_00CF_01C1E4DB.C9976EC0
	charset="iso-8859-1"

I have a Windows program where I am checking several fields and if the fields
are not entered, I want to tell the user to input the data in the field and then
proceed to the next field. If the user does not like what he has entered he can
change it and leave the other fields as entered. I have these several input
statements in a procedure. If the field needs to be entered the program seems to
return to the starting point  at the beginning of the procedure, and does not
return just to the statement being executed. Is this is what is happening, or is
there a way to force it to return to the statement?

jvandal

------=_NextPart_000_00CF_01C1E4DB.C9976EC0
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2722.2800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I have a Windows program where I am checking 
several fields and if the fields are not entered, I want to tell the user to 
input the data in the field and then proceed to the next field. If the user does
not like what he has entered he can change it and leave the other fields as 
entered. I have these several input statements in a procedure. If the field 
needs to be entered the program seems to return to the starting point  at the 
beginning of the procedure, and does not return just to the statement being 
executed. Is this is what is happening, or is there a way to force it to return 
to the statement?</FONT></DIV>
<DIV>&nbsp;</DIV>

------=_NextPart_000_00CF_01C1E4DB.C9976EC0--

new topic     » topic index » view message » categorize

2. Re: return statement

On Tuesday 16 April 2002 02:15 am, you wrote:
>
> I have a Windows program where I am checking several fields and if the
> fields are not entered, I want to tell the user to input the data in the
> field and then proceed to the next field. If the user does not like what he
> has entered he can change it and leave the other fields as entered. I have
> these several input statements in a procedure. If the field needs to be
> entered the program seems to return to the starting point  at the beginning
> of the procedure, and does not return just to the statement being executed.
> Is this is what is happening, or is there a way to force it to return to
> the statement?

You'll have to show us the code for the procedure you mention above. 
It's a bit confusing, since there shouldn't be any "input statements" in 
a Windows program. 

In general, however, you should check the fields when the user 
leaves the last field, or better, when she clicks on an "OK" button, 
signifying that all the necessary data has been entered. Your validation 
routine checks the contents of each entry field, and if invalid, sets focus 
to that field (and perhaps opens a message box explaining what needs to 
be done).

Regards,
Irv

new topic     » goto parent     » topic index » view message » categorize

3. Re: return statement

jvandal,

The following demo isn't exactly what you specified, but it's close & maybe
a start:

-- CODE STARTS:
--  code generated by Win32Lib IDE v0.10.6

include Win32Lib.ew
without warning

----------------------------------------------------------------------------
----
--  Window Window1
global constant Window1 = create( Window, "Enter info into each field, press
finished", 0, Default, Default, 400, 300, 0 )
global constant StatusBar9 = create( StatusBar, "StatusBar9", Window1, 0, 0,
0, 0, 0 )
global constant EditText2 = create( EditText, "", Window1, 24, 20, 50, 20,
0 )
global constant EditText3 = create( EditText, "", Window1, 120, 20, 50, 20,
0 )
global constant EditText4 = create( EditText, "", Window1, 212, 20, 50, 20,
0 )
global constant EditText5 = create( EditText, "", Window1, 28, 68, 50, 20,
0 )
global constant EditText6 = create( EditText, "", Window1, 124, 68, 50, 20,
0 )
global constant EditText7 = create( EditText, "", Window1, 216, 68, 50, 20,
0 )
global constant PushButton8 = create( PushButton, "Finished", Window1, 104,
116, 90, 30, 0 )
----
procedure PushButton8_onClick ()
if length(getText(EditText2)) = 0 or
   length(getText(EditText3)) = 0 or
   length(getText(EditText4)) = 0 or
   length(getText(EditText5)) = 0 or
   length(getText(EditText6)) = 0 or
   length(getText(EditText7)) = 0 then
        setText(StatusBar9, "Please enter data into all fields")
else
  setText(StatusBar9, "ok")
end if
end procedure
onClick[PushButton8] = routine_id("PushButton8_onClick")



WinMain( Window1, Normal )

-- CODE ENDS

----- Original Message -----
From: <sixs at ida.net>
To: "EUforum" <EUforum at topica.com>
Sent: Monday, April 15, 2002 11:15 PM
Subject: return statement



I have a Windows program where I am checking several fields and if the
fields are not entered, I want to tell the user to input the data in the
field and then proceed to the next field. If the user does not like what he
has entered he can change it and leave the other fields as entered. I have
these several input statements in a procedure. If the field needs to be
entered the program seems to return to the starting point  at the beginning
of the procedure, and does not return just to the statement being executed.
Is this is what is happening, or is there a way to force it to return to the
statement?

jvandal

new topic     » goto parent     » topic index » view message » categorize

4. Re: return statement

Dan Moyer
Thanks for the example
Jvandal
----- Original Message -----
From: Dan Moyer <DANIELMOYER at prodigy.net>
Subject: Re: return statement


>
> jvandal,
>
> The following demo isn't exactly what you specified, but it's close &
maybe
> a start:
>
> -- CODE STARTS:
> --  code generated by Win32Lib IDE v0.10.6
>
> include Win32Lib.ew
> without warning
>
--
> ----
> --  Window Window1
> global constant Window1 = create( Window, "Enter info into each field,
press
> finished", 0, Default, Default, 400, 300, 0 )
> global constant StatusBar9 = create( StatusBar, "StatusBar9", Window1, 0,
0,
> 0, 0, 0 )
> global constant EditText2 = create( EditText, "", Window1, 24, 20, 50, 20,
> 0 )
> global constant EditText3 = create( EditText, "", Window1, 120, 20, 50,
20,
> 0 )
> global constant EditText4 = create( EditText, "", Window1, 212, 20, 50,
20,
> 0 )
> global constant EditText5 = create( EditText, "", Window1, 28, 68, 50, 20,
> 0 )
> global constant EditText6 = create( EditText, "", Window1, 124, 68, 50,
20,
> 0 )
> global constant EditText7 = create( EditText, "", Window1, 216, 68, 50,
20,
> 0 )
> global constant PushButton8 = create( PushButton, "Finished", Window1,
104,
> 116, 90, 30, 0 )
> ----
> procedure PushButton8_onClick ()
> if length(getText(EditText2)) = 0 or
>    length(getText(EditText3)) = 0 or
>    length(getText(EditText4)) = 0 or
>    length(getText(EditText5)) = 0 or
>    length(getText(EditText6)) = 0 or
>    length(getText(EditText7)) = 0 then
>         setText(StatusBar9, "Please enter data into all fields")
> else
>   setText(StatusBar9, "ok")
> end if
> end procedure
> onClick[PushButton8] = routine_id("PushButton8_onClick")
>
>
> WinMain( Window1, Normal )
>
> -- CODE ENDS
>
> ----- Original Message -----
> From: <sixs at ida.net>
> To: "EUforum" <EUforum at topica.com>
> Sent: Monday, April 15, 2002 11:15 PM
> Subject: return statement
>
>
> I have a Windows program where I am checking several fields and if the
> fields are not entered, I want to tell the user to input the data in the
> field and then proceed to the next field. If the user does not like what
he
> has entered he can change it and leave the other fields as entered. I have
> these several input statements in a procedure. If the field needs to be
> entered the program seems to return to the starting point  at the
beginning
> of the procedure, and does not return just to the statement being
executed.
> Is this is what is happening, or is there a way to force it to return to
the
> statement?
>
> jvandal
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu