Event handling
-
- User
- Posts: 85
- Joined: Sat Mar 06, 2010 2:55 pm
Event handling
Hi Polo,
You need to do something about the event handling stuff. Too much manual typing needs to be done.
I make a lot of errors with this system.
Why dont you create automatic the event file which belongs to the PBF file? So both are always linked to each other.
-> New project (with Form), Main.pb created.
-> New Form, Input pop-up, Name the Form(class), create 2 files, 1x PBF and 1x PB (link to eachother), add to project
-> New Class/Module/include, input pop-up, namethe file, add to the project, add include in main.pb
Also, On the event procedure, make a select box of the event types supported by the manual.
When somebody clicks on the event, the procedure will pop-up in de source code (Form1.pb).
Then you will have something close to how Delphi/Visual Basic works.
That way you have a cleaner system.
If you need help on programming this, i want to help you.
Like;
- Main.pb
- Form1.pbf
- Form1.pb
You need to do something about the event handling stuff. Too much manual typing needs to be done.
I make a lot of errors with this system.
Why dont you create automatic the event file which belongs to the PBF file? So both are always linked to each other.
-> New project (with Form), Main.pb created.
-> New Form, Input pop-up, Name the Form(class), create 2 files, 1x PBF and 1x PB (link to eachother), add to project
-> New Class/Module/include, input pop-up, namethe file, add to the project, add include in main.pb
Also, On the event procedure, make a select box of the event types supported by the manual.
When somebody clicks on the event, the procedure will pop-up in de source code (Form1.pb).
Then you will have something close to how Delphi/Visual Basic works.
That way you have a cleaner system.
If you need help on programming this, i want to help you.
Like;
- Main.pb
- Form1.pbf
- Form1.pb
Re: Event handling
Some optimisations like the one you suggested could be interesting, we'll focus on getting a stable release for 5.10 then we'll work on new features like this and custom gadgets 

- VB6_to_PBx
- Enthusiast
- Posts: 627
- Joined: Mon May 09, 2011 9:36 am
Re: Event handling
just allow the Form's Code Window to be edited,
then i could add or write in my own Event procedure code right then and there
without any need for an Event file (if i didn't want to use one= would be great Option !!! )
then i could add or write in my own Event procedure code right then and there
without any need for an Event file (if i didn't want to use one= would be great Option !!! )
PureBasic .... making tiny electrons do what you want !
"With every mistake we must surely be learning" - George Harrison
Re: Event handling
What should be allowed to be edited?VB6_to_PBx wrote:just allow the Form's Code Window to be edited
- VB6_to_PBx
- Enthusiast
- Posts: 627
- Joined: Mon May 09, 2011 9:36 am
Re: Event handling
i would like to have ability to edit or add Code to Form's Code WindowPolo wrote:What should be allowed to be edited?VB6_to_PBx wrote:just allow the Form's Code Window to be edited
like in the Picture below (the added Code highlighted in yellow),
then ability to Save it to File and also to Run it just as i edited in the IDE
Add Event code and run it on the fly in the IDE , would be great option !

PureBasic .... making tiny electrons do what you want !
"With every mistake we must surely be learning" - George Harrison
Re: Event handling
I see, might be possible to let some parts of the code editable, I'll see what I can do!
- VB6_to_PBx
- Enthusiast
- Posts: 627
- Joined: Mon May 09, 2011 9:36 am
Re: Event handling
thank you , PoloPolo wrote:I see, might be possible to let some parts of the code editable, I'll see what I can do!
and have a Merry Christmas !
PureBasic .... making tiny electrons do what you want !
"With every mistake we must surely be learning" - George Harrison
Re: Event handling
And youVB6_to_PBx wrote:and have a Merry Christmas !

Re: Event handling
In case it might be useful we could use some delimiter before and after added code, to help Form Designer recognize the added lines:
and btw:
Gaetan, Merry Christmas!
Code: Select all
; FD_UserCode_Start
SetProgressCircleState(#ProgressCircle,10,Data_Sel+2,Circle_Color,$F1F1F1) ; user code example, not parsed by FD
; FD_UserCode_End
Gaetan, Merry Christmas!
Re: Event handling
Thanks Luciano, merry Christmas to you too!