|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Sujet n° 1222 |
GUI basic commands |
le 01/07/2005 @ 03:07 par Shawn
|
Hello, a old "hacker" trying to create applications for personal use. I have had some basic programming in the past, even pascal & fortran! That tells you how old! Anyway, how do i get a better understanding of how to use izbasic? I have created 2 applications in "console" mode. But I would like to get them in more of a form base/gui but, cannot get the hang of it. Is there something else out there besides the manual to help someone get the hang of basic on a palm? The manual is good, but it assumes you know a little palm programming. thanks
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 1 -------- le 01/07/2005 @ 14:11 par aldweb
visiteur |
Hello Shawn,
I agree with you, as the Palm GUI programming is events based, it is not always easy to get it at first glance. Afterwards, you will find it very "natural" And especially because iziBasic really simplifies all the work around this topic. I even believe that it is one of iziBasic's great strengths against its competitors.
I tried to explain the principle in the Appendix #1 of the user manual. Could you tell me if this is enough or not? Overall the principle is the following: all GUI objects are created with a "handle", like:
BUTTON #3,"Show my Text",40,70,80,14 Then a loop scans all the time if an event happens on one of the handled objects:
REPEAT E=DOEVENTS UNTIL E=-1 Would you want to do something when button is pressed (this is an event), then add a line like this:
REPEAT E=DOEVENTS IF E=3 GOSUB _ButtonPressed UNTIL E=-1
As you will understand how to proceed, it would be highly appreciated if you could write a better tutorial
Cheers, aldweb |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 2 -------- le 01/07/2005 @ 14:28 par aldweb
visiteur |
Also read Topic #1221 - Newbie, especially page 3. The same initial understanding issue is encountered
Cheers, aldweb |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 3 -------- le 01/07/2005 @ 21:32 par Shawn
visiteur |
I just don't know the syntax. I try to use your examples in the download to test my thoughts, but I'm happered by my lack of knowledge of the syntax, you did a example of Button #3 in your post, i know that some of the numbers following this has to do with the positon on the screen, but what are they???? My "console" program uses input to capture numeric data from the user and then uses the variables to work these numbers through some equations, I figured it out in the console, because input was something I could understand. The labels don't make it as clean to input x and then maniuplate it inside the program and then display the results or I just don't get it. thanks for putting up with a old guy newbie. |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 4 -------- le 01/07/2005 @ 21:56 par aldweb
visiteur |
BUTTON #handle,"Label",Xpos,Ypos,width,height All of this is explained in the manual... Please read it...
The principle in GUI programming is more or less the following:
1. you design a screen with labels, fields, buttons, etc... Well, you put some objects on the screen. For each object is at least required to know its top left position and its size (width and height).
2. each type of object is dedicated to a specialized function: 2a. a label displays text and does not generate events (it is a passive object). It is the equivalent of PRINT. 2b. a field is ment to input some text or number. It is the equivalent of INPUT. 2c. a button is made to tell the program to do something. It is the equivalent of pressing the [Enter] button after an INPUT (validate that the key in of data is finished, so please do something with it). 2d. and so on: popup list, push buttons, check boxes...
3. you wait for something to happen, what is called an "event". This is what the event loop does. It catches the events. As each type of object is dedicated to a task, you do the coding according to it. For example: 3a. button: if the button is labeled [Calculate] then calculate something 3b. check box: check or uncheck an option and so on...
4. you answer to required events by customized code: calculate something, save a file, popup a message box, etc...
So yes this is more work than "basic" (bad play on words!) console treatments because you have to manage all of these components. But isn't the result much more beautiful?
Does my answer help you?
Cheers, aldweb
@+ aldweb |
|
|
sujet actif
sujet clos
Important!
Nouveau message -
Rectifier message
Clôturer sujet
Remonter
|
|