[Implemented] New Visual Designer

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

[Implemented] New Visual Designer

Post 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
Last edited by Berikco on Tue Sep 06, 2005 8:13 am, edited 3 times in total.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

"Desktop Rommel" lol :lol: You are using the RichEdit instead of scintilla??
User avatar
Kiffi
Addict
Addict
Posts: 1485
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: New Visual Designer

Post 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
Bonne_den_kule
Addict
Addict
Posts: 841
Joined: Mon Jun 07, 2004 7:10 pm

Post by Bonne_den_kule »

Cool! RAD IDE
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

nice preview and nice work!!!
i hope we can have it the next time.
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post 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 :)
Kaisen2100
Enthusiast
Enthusiast
Posts: 121
Joined: Fri May 28, 2004 4:16 pm
Location: Madeira Island, Portugal
Contact:

Post 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? :P ... 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?? :D
PureBasic File Relocator [NEW VERSION 1.1] ==> http://pbfilerelocator.atspace.com/
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

Kaisen2100 wrote:Do you have a ETA (estimated time of arrival) for this new VD?? :D
monday
SPAMINATOR NR.1
Kaisen2100
Enthusiast
Enthusiast
Posts: 121
Joined: Fri May 28, 2004 4:16 pm
Location: Madeira Island, Portugal
Contact:

Post by Kaisen2100 »

Rings wrote:
Kaisen2100 wrote:Do you have a ETA (estimated time of arrival) for this new VD?? :D
monday
yes ... i believe in you ... and i believe that 2*2 <> 2+2 :P
PureBasic File Relocator [NEW VERSION 1.1] ==> http://pbfilerelocator.atspace.com/
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

Rings didn't mention *which* monday!! ;)

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Post 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....

:shock:

BTW: ...but it's up to you, do what ever you want. :wink:
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Post 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
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post 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. :wink:
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.
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post 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.
SPAMINATOR NR.1
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post 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 ;)
Post Reply