Tutorial: events handling with the Form Designer
Re: Tutorial: events handling with the Form Designer
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
Yes. The preferred approach would be to disable the Generate event loop option altogether; just as Fred has said in the preceding post.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.
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.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel
- newtheogott
- Enthusiast
- Posts: 120
- Joined: Sat Apr 26, 2003 2:52 pm
- Location: Germany, Karlsruhe
- Contact:
Re: Tutorial: events handling with the Form Designer
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:
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.
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.
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.
--Theo Gottwald
-----------------------------------------
http://www.it-berater.org * http://www.fa2.de * http://www.smart-package.com
-----------------------------------------
http://www.it-berater.org * http://www.fa2.de * http://www.smart-package.com
Re: Tutorial: events handling with the Form Designer
100% agree.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.
➽ Windows 11 64-bit - PB 6.0 x64 - AMD Ryzen 7 - NVIDIA GeForce GTX 1650 Ti
Sorry for my bad english and the Dunning–Kruger effect.
Re: Tutorial: events handling with the Form Designer
... then you can't use form designercpat wrote: If I do not use the IncludeFile statement, ...
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
('create event loop' flag (checkbock) is removed since 5.50)
- Mindphazer
- Enthusiast
- Posts: 341
- Joined: Mon Sep 10, 2012 10:41 am
- Location: Savoie
Re: Tutorial: events handling with the Form Designer
100% agreeMarc56us wrote: Check Catch Image and Relative path and the FD write all the complicated code for including images
MacBook Pro 14" M1 Pro - 16 Gb - MacOS 14 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
...and unfortunately... Windows at work...