Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1 -------- 16/06/2005 @ 11:01 by aldweb
visitor |
Hello Netzley,
Sure that I will answer Being the developer of this application, I am maybe the only one who really knows what was in my mind when I coded it this way
First, I have to thank you and to congratulate you for analysing this source code (and maybe others?). I indeed believe that the best way to learn a programming environment is to dig deep in some sample source codes. Now, to come to your questions:
#1: This is a mistake I made, indeed this is of no use. It must remain from a previous version or a test where Y$ and Z$ were used.
#2: There are basically 3 ways to update a label. #a
LABEL #1,"Hello",55,1 (...) UPDATELABEL "Bye" #b
LABEL #1,"Hello",55,1 (...) LABEL #1,"Bye",55,1 #c
LABEL #1,"Hello",55,1 (...) DESTROY #1 : LABEL #1,"Bye",55,1 In #a, the label is created once at the right place, then you only update its text value whenever it is needed. In #b, the label is created a first time. Then it is automatically deleted by iziBasic (this is smart, isn't it?) before being created a second time with the new text. In #c, the label is formally removed before being created back. This is not required because of what I wrote for #b.
iBClock uses the #a version, and there are several reasons for doing so: - it is faster at runtime - you don't have to remember the label position each time you want to update its text - the deletion of an object generates a crash in old Handspring devices (see the comment regarding this topic, DESTROY statement in the user manual)
Then, in iBClock some labels are being initiated with an empty string before being updated later on (to display the different times in different formats).
Cheers, aldweb |