aldweb

Fermer I. aldweb

Fermer II. Gratuitiels PC

Fermer III. Gratuitiels Palm

Fermer IV. Partagiciels Palm

Fermer V. iziBasic Palm

Fermer VI. Connaissance Palm

Fermer VII. Ordinateur Poche

Fermer VIII. miniPortail

Spécial !



Version mobile
de l'aldweb Site

m.aldweb.com


Ni Français, ni Anglais ?

Essayez donc l'un de ces drapeaux :
[de] [es] [it] [pt]
Recherche




Météo / Spam / www

Météo Lyon


aldweb contre le SPAM


Newsletter
Pour avoir des nouvelles de ce site, inscrivez-vous à notre Newsletter.
S'abonner
Se désabonner
298 Abonnés
Sites web de la famille

Webmaster - Infos
News Amis
Visites

   visiteurs

   visiteurs en ligne

Sondage
Comment trouve-tu le nouvel habillage de l'aldweb Site ?
 
Superbe !
Joli
Moyen
Moche...
Résultats
forum.gifForum - iziBasic - Sujet n°1462

Forum - Forum
iziBasic - iziBasic


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

actif  Sujet n° 1462  GETFOCUS help

le 08/10/2006 @ 05:47
par bh77a

Anonyme



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
Ecrire à bh77a   Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 1
--------
le 08/10/2006 @ 18:26
par aldweb

Anonyme

visiteur
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
Ecrire à aldweb   Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 2
--------
le 10/10/2006 @ 04:13
par bh77a

Anonyme

visiteur
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
Ecrire à bh77a   Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 3
--------
le 10/10/2006 @ 22:36
par aldweb

Anonyme

visiteur
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
Ecrire à aldweb   Poster une réponse  Haut
actif sujet actif   clos sujet clos   Important! Important!   Nouveau Nouveau message   -   Rectifier Rectifier message   Clôturer Clôturer sujet   Remonter Remonter
[]
Catégories de discussion  Forum 



 
^ Haut ^