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°1085

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° 1085  Newbie: question about keyevents and END

le 03/02/2005 @ 01:07
par Dan K.

Anonyme



I am a little confused by the description of Keyevents. The manual says "Be careful that, when this directive is set, iziBasic overrides the normal behavior
of these keys presses, meaning that if you, for instance, press the Date Book
hard key, exiting from iziBasic will not automatically launch the Date Book
application." It sounds like even AFTER you leave an iziBasic application, the datebook app would not launch. Is this true? Or just that, with Keyevents on, then while IN an izibasic program, hitting datebook will not have the expected result?

Also - I am new to Palm programming - with or without keyevents on - if you don't execute an END statement, will you be locked into your app until you do a reset? Or will Palm end your application when, say, you hit a hard key? And keyevents ON changes this, and you MUST hit an END statement? Does palm multi-task - will your program continue to run in the background?

Great program - thanks!

Dan
  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 03/02/2005 @ 10:58
par aldweb

Anonyme

visiteur
Hello Dan,

Let me try to clarify my bad explanation about the KEYEVENTS compiling directive (it is bad because it confused you!).

If you set KEYEVENTS to OFF, applications made with iziBasic will let a hard button event go its way the normal way, meaning that the application will be closed, the hard button event transfered to Palm OS which will handle it accordingly to the parameters set in the Preferences Buttons panel.

If you set KEYEVENTS to ON, applications made with iziBasic will capture the hard button event, report it to you with a DOEVENTS or WAITEVENT function. Then, it is up to you to handle this event.

In the next release of iziBasic, I will add a new PARTIAL parameter to KEYEVENTS to capture from an application made with iziBasic all hard buttons events but the 4 ones dedicated to launching applications (Date Book...). This means that these 4 buttons will be handled as for the OFF parameter and the other buttons (Power On/off...) will be handled as for the ON parameter.

I hope that you will no more be confused... even though I feel that I was not so clear in my explanations here!

Cheers
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 03/02/2005 @ 11:08
par aldweb

Anonyme

visiteur
As for your question about the END statement, let me try to answer.

One END statement must be put in your source code, together with a BEGIN one to define the main block of instructions.
It gives to iziBasic the information of the entry point and the normal exit point.
When END is reached, the application will close and you will be returned to the Palm launcher.

There are different cases when this instruction will never be used.
For instance, I can think of:
1. as you noticed it, with KEYEVENTS OFF. The only way to exit your application would be with one of the 4 hard buttons launching an application.
2. if you use CHAIN to switch from one code module to another one.
3. if you use RUN to exit your application and switch to another one.
You might, in these cases, avoid writing the END statement, BUT I did not test it. And this END statement does have an impact on the compiled code size of only one byte, meaning that it is not worth avoiding it!

Palm OS is natively multitask but, so far, only one task is dedicated to run the applications in the foreground. This is a big difference with Pocket PC... for which you then easily face performance and memory load issues...

Cheers
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° 3
--------
le 03/02/2005 @ 17:47
par Dan K.

Anonyme

visiteur
Thanks. I think my question about END really was about: could you write a program (accidentally or on purpose) that could not be ended? If you used KEYEVENTS ON, and failed to offer an option that ended your program, might the user be hung up until they hit reset?

I noticed that WAIT suppresses everything except the power button - at least on my Treo 600. I wonder what would happen if I got an imcoming call, or an SMS message. I'll have to test that.

Mostly, this is just curiousity - and a warning to myself to avoid bad programming if I use KEYEVENTS ON. But you did clarify exactly what KEYEVENTS does - thanks.

Dan
Ecrire à Dan K.   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° 4
--------
le 10/02/2005 @ 23:04
par Jim

Anonyme

visiteur
Yes, you certainly can create an app that "won't end". For example, the following:

' Lockup.ibas
{CREATORID "LOCK"}
{Version "666"}
{KEYEVENTS ON}
BEGIN
REPEAT
a=DOEVENTS
UNTIL b=1
END

Notice the typo of "b" instead of "a" in the second to last line. A simple mistake that requries a soft reset.
Ecrire à Jim   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 ^