Better code creation from formdesigner

You need some new stunning features ? Tell us here.
User avatar
scanfff
User
User
Posts: 18
Joined: Thu May 30, 2019 10:02 am
Location: Seattle
Contact:

Better code creation from formdesigner

Post by scanfff »

HI,

I really love the form designer, hower I really feel like the code it generates could work better with the no-form files in a project. For example, I layed out a great looking dialog went to the code view and spent quite sometime figuring out how to communicate with the gadgets on it. Finally I copied the code view to my mail.pb and changed the variables.

I am learning using the vast examples I've found. Most poll the events .. basically do.... until the form is closed. The generated code from the form builder really does not feel like it's part of the system.

I've been away from basic coding for 20+ years, mainly c++ nodays but I do love basic and purebasic give me comparable speed and size to c++. I love it. I use to love the ease of VB6, plop things on a form and dbl click for the code view. The easy of saying form1 is the programs startup was simple, yes I'm still learning PB but how do you do that?

Sorry I'm not trying to complain. I would love to see improvement to the form designer.

Keep up the great work, Thank you!
Aaron
User avatar
mk-soft
Always Here
Always Here
Posts: 5333
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Better code creation from formdesigner

Post by mk-soft »

Perhaps help...

Event-Designer create better code :wink:
Show Signatur
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
scanfff
User
User
Posts: 18
Joined: Thu May 30, 2019 10:02 am
Location: Seattle
Contact:

Re: Better code creation from formdesigner

Post by scanfff »

I would love to. I'm a noob here, I just started with PB a month ago. But yes I'd love to contribute :)
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: Better code creation from formdesigner

Post by Marc56us »

Welcome scanfff,

The Form Designer is a code generator. To be able to change the code several times, the system must identify all the gadgets present without being parasitic by the rest of the code. That's why each form has its own file.

The (x)Include command only copies and pastes the code into a single file at compile time.

When you have used it more, you will find that it does a lot of operations for you. For example, if you put several forms in a single project, it makes sure that it never reuses the same variable names or constants for the entire project.

It generates the automatic resizing procedure for gadgets on its own.

It manages menus (but not popup menus) and toolbars (but not yet the new 24x24 icons)

It does the (tedious) code for image loading, including CatchImage (see Form menu: Image Manager)

I have programs that sometimes have up to 15 forms with 50 gadgets, I wouldn't be able to do it by hand.

For events, it is preferable to manage them yourself in the main code.

It is certain that we would prefer RAD (like VB or Delphi/Lazarus) but it is then likely that we would lose control (of what is really happening behind the code) and lightness and therefore in speed of application.

:wink:
User avatar
mk-soft
Always Here
Always Here
Posts: 5333
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Better code creation from formdesigner

Post by mk-soft »

My Event-Designer is a kind of RAD extension for the FormDesigner.
The only important thing is that a unique constant is assigned to the window in the form.
This is used as a prefix for all menus and gadgets to avoid conflicts with multiple forms.
Extensions or changes to the forms are not a problem.

But I'm still thinking about changing the structure of the automatically created program blocks.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
Zebuddi123
Enthusiast
Enthusiast
Posts: 794
Joined: Wed Feb 01, 2012 3:30 pm
Location: Nottinghamshire UK
Contact:

Re: Better code creation from formdesigner

Post by Zebuddi123 »

Hi scanfff

Take a look at viewtopic.php?f=12&t=68187&hilit=sweetyvd

Zebuddi. :)
malleo, caput, bang. Ego, comprehendunt in tempore
User avatar
scanfff
User
User
Posts: 18
Joined: Thu May 30, 2019 10:02 am
Location: Seattle
Contact:

Re: Better code creation from formdesigner

Post by scanfff »

Zebuddi123 wrote:Hi scanfff

Take a look at viewtopic.php?f=12&t=68187&hilit=sweetyvd

Zebuddi. :)
oh oh cool. I'm downloading and I'll try it later. Thank You :)
Post Reply