Page 1 of 1

Event handling

Posted: Mon Dec 24, 2012 3:31 pm
by DoctorLove
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

Re: Event handling

Posted: Mon Dec 24, 2012 4:21 pm
by Polo
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 ;)

Re: Event handling

Posted: Mon Dec 24, 2012 9:12 pm
by VB6_to_PBx
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 !!! )

Re: Event handling

Posted: Mon Dec 24, 2012 9:26 pm
by Polo
VB6_to_PBx wrote:just allow the Form's Code Window to be edited
What should be allowed to be edited?

Re: Event handling

Posted: Mon Dec 24, 2012 10:30 pm
by VB6_to_PBx
Polo wrote:
VB6_to_PBx wrote:just allow the Form's Code Window to be edited
What should be allowed to be edited?
i would like to have ability to edit or add Code to Form's Code Window
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 !


Image

Re: Event handling

Posted: Mon Dec 24, 2012 10:33 pm
by Polo
I see, might be possible to let some parts of the code editable, I'll see what I can do!

Re: Event handling

Posted: Mon Dec 24, 2012 10:38 pm
by VB6_to_PBx
Polo wrote:I see, might be possible to let some parts of the code editable, I'll see what I can do!
thank you , Polo
and have a Merry Christmas !

Re: Event handling

Posted: Mon Dec 24, 2012 10:44 pm
by Polo
VB6_to_PBx wrote:and have a Merry Christmas !
And you :)

Re: Event handling

Posted: Mon Dec 24, 2012 11:50 pm
by luciano
In case it might be useful we could use some delimiter before and after added code, to help Form Designer recognize the added lines:

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
and btw:
Gaetan, Merry Christmas!

Re: Event handling

Posted: Tue Dec 25, 2012 12:22 am
by Polo
Thanks Luciano, merry Christmas to you too!