I wanted to test out a screen with a box in which the user can type an e-mail
address and a button to click when he's done so. Since the user is going to type
an e-mail address, I figured a Gnoga.Gui.Element.Form.Email_Type would be
appropriate.

The idea is that the user would enter the address, click on the button, I'd get
the entered text, and do some additional checks on it. If it failed, I'd display
a message saying why, and the user could retry. If it succeeded, then I would go
on to the next stage.

For my 1st try I used a plain button with an on-click handler, and found that I
couldn't retrieve the text from the box. Calling the Text function returned a
null string.

Next I tried a submit button with an on-submit handler. I noted that when I
clicked on the button, my connection was disconnected, presumably deallocating
my connection data, and a new connection was created. I couldn't see how to
retrieve the entered text from the box. If I retrieved the connection data using
the Connection_Data function, Text returned a null string. Any message I tried
to display did not appear, presumably because the new connection redraws the
screen with new connection data.

Finally I tried using a submit button and a separate on-connect handler, as was
done in tutorial 08. This allows me to obtain the entered text from the
associated form parameter. It also does the disconnect/reconnect. I'm not clear
how I would get from there back to the original screen with a message for the
user to try again.

-- 
Jeff Carter
"You a big nose have it."
Never Give a Sucker an Even Break
107

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Gnoga-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to