Page 1 of 4
[Implemented] New Visual Designer
Posted: Mon Jun 06, 2005 8:35 pm
by Berikco
I put this here, as it seems every 3 months, someone is requesting the same things for the Visual Designer, event procedures etc....
The current - unfinished - Visual Designer has event procedures for gadgets.
You can edit the generated code as much as you want, because the Visual Designer now uses just plain ASCII PureBasic source code to load and save the projects, no more binary file.
But..... a lot...lot...lot of work is needed before this can be released.
And.... i don't have a lot of spare time, but i continue to work on the Visual Designer every week...so progress is slow.
Here's a little preview
http://www.purebasic.be/vd2.png
Posted: Mon Jun 06, 2005 9:06 pm
by Trond
"Desktop Rommel" lol

You are using the RichEdit instead of scintilla??
Re: New Visual Designer
Posted: Tue Jun 07, 2005 4:29 am
by Kiffi
> The current - unfinished - Visual Designer has event procedures for
> gadgets.
Great!
> no more binary file.
Wonderful!
> But..... a lot...lot...lot of work is needed before this can be released.
so you have to hurry up
Looking forward to your new version ... Kiffi
Posted: Tue Jun 07, 2005 6:44 am
by Bonne_den_kule
Cool! RAD IDE
Posted: Tue Jun 07, 2005 3:16 pm
by nicolaus
nice preview and nice work!!!
i hope we can have it the next time.
Posted: Tue Jun 07, 2005 3:41 pm
by Berikco
Trond wrote:"... You are using the RichEdit instead of scintilla??
Not realy, if you look closely to the picture, you can see its actualy just the PB Editor used for displaying the code. So next time it wil be scintilla

Posted: Tue Jun 07, 2005 4:23 pm
by Kaisen2100
Greaaaaaattt just great ...it is what i was waiting for ... put code directly in the Visual Designer ... what you need to finalize it fast?

... do you need help? ... may be time ... hheheheh
Good work ... i am waiting. Do you have a ETA (estimated time of arrival) for this new VD??

Posted: Tue Jun 07, 2005 5:36 pm
by Rings
Kaisen2100 wrote:Do you have a ETA (estimated time of arrival) for this new VD??

monday
Posted: Tue Jun 07, 2005 8:30 pm
by Kaisen2100
Rings wrote:Kaisen2100 wrote:Do you have a ETA (estimated time of arrival) for this new VD??

monday
yes ... i believe in you ... and i believe that 2*2 <> 2+2

Posted: Tue Jun 07, 2005 10:47 pm
by LarsG
Rings didn't mention *which* monday!!

Posted: Tue Jun 07, 2005 11:14 pm
by fsw
Berikco,
sorry to tell you but, what I don't get is the fact how your NEW event loop is designed:
Code: Select all
; create gadgets...
hWndButton_0 = ButtonGadget(#Button_0,x,y,....)
;.... more code
;... in event loop...
If GadgetID = #Button_0
;code for Button_0 ... maybe call a procedure ...
Button_0_Function()
ElseIf GadgetID = #Button_1
;code for Button_1
ElseIf GadgetID = #Button_2
;code for Button_2
ElseIf GadgetID = #Button_3
;code for Button_3
; ... and so on ...
ElseIf GadgetID = #Button_788
;code for Button_788
ElseIf GadgetID = #Button_789
;code for Button_789
EndIf
; ...more code...
; end of program
end
; start gadget functions
Procedure Button_0_Function()
; do something...
EndProcedure
; ...and so on ...
Back in the days when I came to PureBasic (around summer 2001) the first thing I wanted was a event driven gui. The user Mr.Skunk helped getting things started and provided a little lib. Since his lib didn't work anymore with newer versions of pb I've provided another little lib that did just that (an older version is still in PureArea).
The result is a nicer, shorter and not so error-prone event loop:
(short example how it works)
Code: Select all
; create gadgets...
Button_0 = ButtonGadget(#PB_Any,x,y,....)
ConnectGadget(Button_0, @Button_0_Function())
;.... more code
;... in event loop...
If GadgetID
CallFuncionOfGadget(GadgetID)
EndIf
; end of program
end
; start gadget functions
Procedure Button_0_Function()
; do something...
EndProcedure
; ...and so on ...
This way you have only one section for gadgets (or menues or whatever) in the event loop and it doesn't matter if you use 1 Gadget or 789 Gadgets.
I don't mean that you have to use my lib, but why not use the same approach to make things easier (hope you get my point).
It is not my intention to insult anybody, but I see no advantage in doing it the way you code the event loop - only disadvantages.
It looks so overcomplicated...
And this after all these years....
BTW: ...but it's up to you, do what ever you want.

Posted: Wed Jun 08, 2005 6:23 am
by Kukulkan
Hi,
I agree with
fsw.
His UserLib seems to integrate more perfect. I don't need to see/edit the GUI-loop-code if every(!) event is directed to the connected procedure. It will also help to clear the code.
By the way, Berikco, this new VD looks very good! PB seems to go RAD.
Kukulkan
Posted: Wed Jun 08, 2005 10:48 am
by Berikco
fsw wrote:Berikco,
sorry to tell you but, what I don't get is the fact how your NEW event loop is designed:
BTW: ...but it's up to you, do what ever you want.

It's just a standard event loop, with if/endif or Select/Case
I only see disadvantages in using a closed lib, sounds more like VB blackbox to me.
PB is not designed to work like that.
The Visual Designer supports "ONLY" official PureBasic code, gadgets etc...and they must work on all platforms.
So there is no choice for me how to do it, i must follow PureBasic.
I still remember how i started the Visual Designer, a tool was requested to quickly draw the gadgets, because aligning them in code was difficult..etc...
Now it seems everybody is forgotten that, and they want it to manage the whole code, inclusive the event loop. This is not possible in PureBasic, Fred would have to create a closed binary file format, because now in ASCII, it's not possible to see the link between event loop, gadgets panels etc.. not even the compiler knows this.
So, i can tell you, even in the new VD, you still have to code a lot manualy on the event loop...there is no way the VD can manage a complete event loop, only generating a new one every time is possible.
Posted: Wed Jun 08, 2005 12:12 pm
by Rings
and that is how VB managed it.
The complete EventHandler under VB is hidden(.NET too) .
Only the Event-Procedures are open to the public(Coder).
Same direction as VD now going.
Posted: Wed Jun 08, 2005 1:18 pm
by Berikco
Is (was) the same under GFA Basic 32
It would be very easy for me if Purebasic had this functionality.

So Fred wil have to write this kind of lib for all versions
