[plt-scheme] GUI builder ?

From: Ivan Altaparmakov (ialt at tu-sofia.bg)
Date: Tue Dec 12 09:43:16 EST 2006

My tought was that it will be good if learning of GUI building
is put in erlier stage of learning - before object system.
It is more exciting to print and input to/from graphical form and controls
insteoad of console and if this printing is as easy as to console.
Justbasic had done this in easy way and in way similar to scheme sending 
commands to objects. 
Lerning object system would be done later.

 Few lines of code :

     print #main, "font ms_sans_serif 0 16" - sends command to main form 
to set the font 
     print #main.textbox3, "!contents? value$" sends command to textbox2 of main
form to store contents of the text field in value$ variable i.e. inputs value
from text box control
     print #main.statictext2, value$  - prints value of variable value4 to the 
statictext of main form 

this is just print and input and no object system , but better then console.

here the hole text which is generated automaticaly except 2 lines :


    WindowWidth = 550
    WindowHeight = 410

    button #main.button1, "Button Caption", [button1Click], UL, 26, 16, 122, 25
    statictext #main.statictext2, "StaticText Caption", 22, 56, 144, 20
    textbox #main.textbox3, 30, 86, 100, 25
    open "untitled" for window as #main
    print #main, "font ms_sans_serif 0 16"

[main.inputLoop]   'wait here for input event

[button1Click]   'Perform action for the button named 'button1'
    'Insert your own code here
    print #main.textbox3, "!contents? value$"
    print #main.statictext2, value$

> Of interest, I see GUIbuilder as a way of learning the object system.  (and
> also as a way of refactoring hand written GUI code into something readable.)
> Corey
> -- 
> ((lambda (y) (y y)) (lambda (y) (y y)))


Posted on the users mailing list.