Page 2 of 2

Re: Tutorial: events handling with the Form Designer

Posted: Sun Feb 14, 2016 1:23 pm
by Fred
This 'create event loop" flag will be removed in the next PB version as it's not useful but very confusing. It should be always uncheked to use the form designer properly.

Re: Tutorial: events handling with the Form Designer

Posted: Sun Feb 14, 2016 4:48 pm
by TI-994A
newtheogott wrote:...i have to disable the "create Event Loop" in the Form Designer and do that manually in an include file, then i can write my Form-initialization just in front of that.
Yes. The preferred approach would be to disable the Generate event loop option altogether; just as Fred has said in the preceding post.

The form file would then contain purely form code, while all executable code would reside in external code files, including the main event processing loop.

Re: Tutorial: events handling with the Form Designer

Posted: Sun Feb 14, 2016 7:18 pm
by newtheogott
I would really like a system, where the Form Designer generates all the code.
Including all the Event-Procedures. This is normally the Standard.

Thats only possible, if all the Form-Data is stored in a separate file (such files are known from VB).
Then the Form Designer can always "regenerate" the code from this file.
No matter what changes the user did in the code.

As a help, the Form-Designer could use comments in the code-file to find each item-line.
For example:

Code: Select all

;###FD:Gadget 021 Begin
... (Code that was generated)
;###FD:Gadget 021 End

And between these blocks the user could do what he wants.
Otherwise "Newbies" like me will not be able to make a usable form without first studying the manual.
And - in case of many buttons - have a lot of typing work that could easily be automated by somebody who really knows how to use the underlying system.

Re: Tutorial: events handling with the Form Designer

Posted: Tue Mar 14, 2017 10:54 pm
by falsam
Fred wrote:This 'create event loop" flag will be removed in the next PB version as it's not useful but very confusing. It should be always uncheked to use the form designer properly.
100% agree.

Re: Tutorial: events handling with the Form Designer

Posted: Wed Mar 15, 2017 11:03 am
by Marc56us
cpat wrote: If I do not use the IncludeFile statement, ...
... then you can't use form designer :)

Look here (at bottom) « Using the form designer in real world projects »
https://www.purebasic.com/documentation ... _form.html

PS. A very good option of the form designer is the Image manager
Check Catch Image and Relative path and the FD write all the complicated code for including images 8)

:wink:

('create event loop' flag (checkbock) is removed since 5.50)

Re: Tutorial: events handling with the Form Designer

Posted: Wed Mar 15, 2017 11:22 am
by Mindphazer
Marc56us wrote: Check Catch Image and Relative path and the FD write all the complicated code for including images 8)
100% agree 8)