About from TEXT mode to GUI mode and Object Oriented
Posted: Tue Nov 03, 2015 5:15 pm
This is the big question. How do I move from TEXT mode to GUI mode. It looks so difficult.
Well, eXpress++ is there for that and I will explain in words for beginners how it works.
In TEXT mode, it a very small world, you could do an application that execute a set of command and then quits. You could be a bit more fancy doing a loop like
DO WHILE
SHOW MENU1
SHOW MENU2
DO CASE
CASE MENU1
CODE
CASE MENU2
CODE
ENDDO
You have just created a loop. You can do more with a menu function that does it all but you are only managing keyboard inputs.
Onces you would like to manage mouse, keyboard, and other input devices, you need to have a event loop. And base on the event result, action is required. You could start creating all your events, but on a large application, you have a lot of your ahead.
If you look at the Graphic User Interface, GUI, it´s all about mouse and windows. And they are all kind of linked together. This is where Object Oriented Programming is needed. But this is scary too.
eXpress++ will do this part, create the dialogs, the windows, the objects in a simple commands set.
Commands have a big advantage. You can have many options and you dont have to pass them as parameters.
So just like you use to have
@ 10, 10 SAY "MY NAME IS" GET cName
READ
Now you would do
@ 10, 10 DCSAY "MY NAME IS" GET cName
DCREAD GUI
And this creates the windows, manages events etc. That simple.
There is more to understand, I will continue in another post.
Well, eXpress++ is there for that and I will explain in words for beginners how it works.
In TEXT mode, it a very small world, you could do an application that execute a set of command and then quits. You could be a bit more fancy doing a loop like
DO WHILE
SHOW MENU1
SHOW MENU2
DO CASE
CASE MENU1
CODE
CASE MENU2
CODE
ENDDO
You have just created a loop. You can do more with a menu function that does it all but you are only managing keyboard inputs.
Onces you would like to manage mouse, keyboard, and other input devices, you need to have a event loop. And base on the event result, action is required. You could start creating all your events, but on a large application, you have a lot of your ahead.
If you look at the Graphic User Interface, GUI, it´s all about mouse and windows. And they are all kind of linked together. This is where Object Oriented Programming is needed. But this is scary too.
eXpress++ will do this part, create the dialogs, the windows, the objects in a simple commands set.
Commands have a big advantage. You can have many options and you dont have to pass them as parameters.
So just like you use to have
@ 10, 10 SAY "MY NAME IS" GET cName
READ
Now you would do
@ 10, 10 DCSAY "MY NAME IS" GET cName
DCREAD GUI
And this creates the windows, manages events etc. That simple.
There is more to understand, I will continue in another post.