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 #1462

Forum - Forum
iziBasic - iziBasic


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

active  Topic # 1462  GETFOCUS help

08/10/2006 @ 05:47
by bh77a

Anonymous



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
Write to bh77a   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
--------
08/10/2006 @ 18:26
by aldweb

Anonymous

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
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° 2
--------
10/10/2006 @ 04:13
by bh77a

Anonymous

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
Write to bh77a   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
--------
10/10/2006 @ 22:36
by aldweb

Anonymous

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
Write to aldweb   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 ^