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

Forum - Forum
iziBasic - iziBasic


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

active  Topic # 1085  Newbie: question about keyevents and END

03/02/2005 @ 01:07
by Dan K.

Anonymous



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

Anonymous

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

Anonymous

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

Anonymous

visitor
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
Write to Dan K.   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
--------
10/02/2005 @ 23:04
by Jim

Anonymous

visitor
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.
Write to Jim   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 ^