problem with child projects and the 'enter' key
May 14, 2011 12:34:02 GMT -5
Post by colinmac on May 14, 2011 12:34:02 GMT -5
Hello,
I am developing a programme that uses a main project and several child projects, each to manage a seperate table in a database. I have found that pressing the enter key when using a textbox can lead to strange behavour. The code below uses input statements, but the behaviour is the same with textboxes.
Here is the main, calling, programme called 'mainproblem.bas'
now the two child projects. firstchild.bas
and secondchild.bas
Using the 'accept' button to complete a name entry works as I would expect. Pressing 'enter' to complete an entry in 'firstchild' cancels the entry. Not what I would expect but Okish. Doing the same in 'secondchild' switches everything to 'firstchild'.
Does anyone know what is going on here, and how to avoid it?
Thanks, Colin
I am developing a programme that uses a main project and several child projects, each to manage a seperate table in a database. I have found that pressing the enter key when using a textbox can lead to strange behavour. The code below uses input statements, but the behaviour is the same with textboxes.
Here is the main, calling, programme called 'mainproblem.bas'
run "firstchild" , #firstchild
run "secondchild", #secondchild
wait
[firstClicked]
dummy = runbanner()
render #firstchild
wait
[secondClicked]
dummy = runbanner()
render #secondchild
wait
function runbanner()
cls
html "<h3> my problem children</h3> "
button #firstchildbutton, "first child process", [firstClicked]
button #secondchildbutton, "second child process", [secondClicked]
html "<br />"
end function
now the two child projects. firstchild.bas
rem firstchild code
[loop]
input " first child name? " ; fchild
goto [loop]
waitand secondchild.bas
rem secondchild code
[loop]
input " second child name? " ; schild
goto [loop]
waitUsing the 'accept' button to complete a name entry works as I would expect. Pressing 'enter' to complete an entry in 'firstchild' cancels the entry. Not what I would expect but Okish. Doing the same in 'secondchild' switches everything to 'firstchild'.
Does anyone know what is going on here, and how to avoid it?
Thanks, Colin