aldweb

Close I. aldweb

Close II. PC Freeware

Close III. Palm Freeware

Close IV. Palm Shareware

Close V. iziBasic Palm

Close VI. Palm Knowledge

Close VII. Pocket Computer

Close VIII. miniPortail

Special !



Mobile version of
the aldweb Site

m.aldweb.com


Neither French, nor English?

Try one of these flags then:
[de] [es] [it] [pt]
Search




Weather / Spam / www

Lyon Weather


aldweb against spam


Newsletter
To receive news about this website, consider subscribing to our Newsletter.
Subscribe
Unsubscribe
298 Subscribers
Family's web sites

Webmaster - Infos
Friends News
Visits

   visitors

   visitors online

Poll
What do you think of the new design of the aldweb Site?
 
Great !
Beautiful
Average
So ugly...
Results
forum.gifForum - iziBasic - Topic #1370

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

active  Topic # 1370  Exit & Input

05/03/2006 @ 20:58
by Nevin

Anonymous



I there a way to code so that a user can exit a program while waiting for either an "input", a "textfield" or a "numfield" command other than entering in a exit command into the field.(I am not sure if this is clear)

I guess what I am really asking is can a button (of any type) recieve commands at the same time as Numfield or textfield.
Write to Nevin   Post an answer  Top

[]   


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1
--------
07/03/2006 @ 01:38
by Lou

Anonymous

visitor
If I understand your question, the presence of a field doesn't effect the button, or vice versa. When you place the field, the user can change the contents whenever he/she wants, or press a button, etc. As far as I can tell, changing the field does not generate any event. You'd use a button (maybe captioned "Enter") to generate an event that would execute code to get the field contents and do something with it. You could very well have another button to exit the form, exit the program, whatever.

Something like:

'beeps.ibas
{Creator ID "abcd"}
begin
label #2, "How many beeps?", 20, 30
numfield #1, "0", 20, 50, 60, 15
button #11, "Enter", 10, 100, 50,15
button #99, "Exit", 70, 100, 50, 15
repeat
e=doevents
if e=99 e=-1
if e=11 gosub _HandleField
until e<0
end

_Handlefield:
n$­­=field$­­(#1)
n=val(n$­­)
for i=1 to n
beep
next
return

Hope this helps.

Lou
Write to Lou   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2
--------
07/03/2006 @ 20:39
by Nevin

Anonymous

visitor
I had to make a few small changes for it to work, but thanks for your help. I forgot the Doevents statement and was not using a handler. This syntax actually reminds me of Pocket C Architect. One thing I noticed is that inorder for the numfield to recieve commands automatically from the keyboard, the buttons have to be built first with the numfeild as the last object. This eliminates having to tap in the field to enter text.

Nevin
Write to Nevin   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 3
--------
07/03/2006 @ 22:22
by aldweb

Anonymous

visitor
Hello Nevin,

You may very well create all objects in any order and apply the SETFOCUS statement afterwards to give the focus to a given field.

Cheers,
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 4
--------
08/03/2006 @ 03:07
by Lou

Anonymous

visitor
Aldweb,

Now that you mention SETFOCUS:

I've not been able to get SETFOCUS #0 to work as suggested in the manual. I have 2 TEXTFIELDS, a few buttons, a few labels, and several IMAGEBUTTONS. But when using SETFOCUS #0, the focus remains on one of the TEXTFIELDS. Any thoughts?

Also, does Palm OS support giving the focus to buttons, perhaps so that the select button of the 5 way pad would activate it? I see SETFOCUS refers only to fields, I assume there's a reason.

Lou
Write to Lou   Post an answer  Top
active topic active   closed topic closed   Sticky Sticky   New New message   -   Correct Correct message   Close Close topic   Make sticky Make sticky
[]
Forum Topic  Forum 



 
^ Top ^