|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Sujet n° 1515 |
Updatelabel |
le 25/02/2007 @ 16:03 par JoeV
|
I have an app that displays many values and strings and they must be updated frequently. An easy way to do this is to create a resource file containing various labels and then use iziBasic's updatelabel statement to change the values as needed. While there are other way of doing it, I prefer this method because it allows me to change and view the form without changing the Basic code. It also keeps code size to a minimum.
While doing this, I noticed that my code would run occasionally, crash occasionally, and do strange things mostly. Updatelabel would write to the wrong screen loc, not write at all, or disable other gui objects. After several hours of hair pulling and wisdom from Aldweb, I found the problem.
When creating a resource file form, your label must reserve enough character space for the longest text that will be updated. To put it another way, when creating a resource file label, the initial string size (in chars) must be >= the number of characters that will be updated using the updatelabel statement. If even one label has less chars, strange things happen, probably because text overwrites code. This is not necessary, however, if the label is created within iziBasic because aldweb reserves 63 chars for the label. The initial label string created within iziBasic, therefore, may be a single character, yet long text strings may be updated with no ill effects.
While this may be obvious to many of the readers of this forum, it was overlooked by me. So I feel compelled to post it here that it may save some (other) poor soul some time and aggravation.
Hope this helps someone.
JoeV
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 1 -------- le 25/02/2007 @ 21:26 par bh77a
visiteur |
Hi JoeV,
Great tip. Thanks for sharing. You might want to add it to the iziBasic wiki... you already got the password from me, didn't you?!
Regards, bh77a |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 2 -------- le 26/02/2007 @ 17:13 par JoeV
visiteur |
Hey bh,
I've been wanting to add some things to the wiki for weeks now but have been on overload lately. I do think a tips & tricks section might be helpful. But I'm not sure yet how to do it.
Thanks for the comment.
JoeV
|
|
|
sujet actif
sujet clos
Important!
Nouveau message -
Rectifier message
Clôturer sujet
Remonter
|
|