It is currently Sun May 31, 2020 1:16 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Better code creation from formdesigner
PostPosted: Fri May 31, 2019 11:19 am 
Offline
User
User
User avatar

Joined: Thu May 30, 2019 10:02 am
Posts: 10
Location: Seattle
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Better code creation from formdesigner
PostPosted: Fri May 31, 2019 12:05 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2477
Location: Germany
Perhaps help...

Event-Designer create better code :wink:
Show Signatur

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Better code creation from formdesigner
PostPosted: Fri May 31, 2019 12:54 pm 
Offline
User
User
User avatar

Joined: Thu May 30, 2019 10:02 am
Posts: 10
Location: Seattle
I would love to. I'm a noob here, I just started with PB a month ago. But yes I'd love to contribute :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Better code creation from formdesigner
PostPosted: Fri May 31, 2019 1:17 pm 
Offline
Addict
Addict

Joined: Sat Feb 08, 2014 3:26 pm
Posts: 846
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:

_________________
(English is not my native language, I use an online translator.)


Top
 Profile  
Reply with quote  
 Post subject: Re: Better code creation from formdesigner
PostPosted: Fri May 31, 2019 1:53 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2477
Location: Germany
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 / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Better code creation from formdesigner
PostPosted: Fri May 31, 2019 11:14 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Feb 01, 2012 3:30 pm
Posts: 766
Location: Nottinghamshire UK
Hi scanfff

Take a look at https://www.purebasic.fr/english/viewtopic.php?f=12&t=68187&hilit=sweetyvd

Zebuddi. :)

_________________
malleo, caput, bang. Ego, comprehendunt in tempore


Top
 Profile  
Reply with quote  
 Post subject: Re: Better code creation from formdesigner
PostPosted: Fri May 31, 2019 11:26 pm 
Offline
User
User
User avatar

Joined: Thu May 30, 2019 10:02 am
Posts: 10
Location: Seattle
Zebuddi123 wrote:


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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye