Weather / Spam / www |
Lyon Weather
aldweb against spam
|
|
|
|
|
|
|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Topic # 1462 |
GETFOCUS help |
08/10/2006 @ 05:47 by bh77a
|
10.07.06
Good evening,
Been working on a simple conversion calculator that has two text fields and a number field. A small numberpad of buttons is also on the form. The way that it is supposed to work: press a button and it goes to the following subroutine.
_update_field: F=GETFOCUS REM PRINT F (debugging) IF F=15 THEN A$=FIELD$(#15) A$=A$+B$ UPDATEFIELD #15, A$ ENDIF ... ... ... RETURN
However, GETFOCUS is not seeming to work for me. When I PRINT it to screen to see the value, it displays "0". So, there is my problem, GETFOCUS is telling me that field 0 has focus and therefore never goes into the IF THEN branch.
I am sure that this is just a simple error in syntax on my part, but it is driving me nuts. Can't seem to find anything that I am doing wrong after looking at the manual.
This is on a Palm TX, using iziBasic 6 and viziBasic 2.
Any suggestions would be appreciated.
Regards, bh77a |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1 -------- 08/10/2006 @ 18:26 by aldweb
visitor |
Hello bh77a,
My guess is that once you press the button, the button gets the focus and therefore the field looses focus and this is why the GETFOCUS returns some null value.
I would need further testing to make sure of what I wrote above... it could also be a mistake of mine in iziBasic...
On your side (this is what I would test), you can check by retrieving GETFOCUS in your events loop and then make sure that it gets updated correctly at that time... until you press the button.
Cheers
PS: "driving me nuts"... I got that feeling so many times when developing iziBasic (and I still have a [censured] bug I am fooling around with since one year!) that I feel very bad that iziBasic could drive you to this feeling. Sorry!
@+ aldweb |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2 -------- 10/10/2006 @ 04:13 by bh77a
visitor |
Hello aldweb,
Thank you for the suggestion. Setting up the loop as the following solved the problem:
REPEAT F=GETFOCUS ...
iziBasic itself has never driven me nuts. :) My occasional failure to see the obvious does though. Now that I have set up the code and it works, I cannot understand why I didn't think of that at the first. ;)
Regards, bh77a |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 3 -------- 10/10/2006 @ 22:36 by aldweb
visitor |
I cannot understand why I didn't think of that at the first. ;)
Maybe because you were too busy with the iziBasic wiki I am really happy with all the work already done and undergoing in this wiki. We will have to start promoting it now
Cheers
@+ aldweb |
|
|
topic active
topic closed
Sticky
New message -
Correct message
Close topic
Make sticky
|
|
|
|
|
|