Disabling "Generate event procedure" deletes event procedure in already existing form with event procedures?
Posted: Wed Dec 03, 2025 10:33 pm
Hi,
I was wondering if the following is the intended behaviour of the PureBasic form designer?:
If I disable "Generate event procedure" in File -> Preferences -> Form, this seems to also delete the an existing event procedure in the form that is currently being edited, even though this form already has an event procedure (for example the "Procedure Window_0_Events(event)" part). This seems to happen even if I have checked "Generate events procedure?" in the form properties.
I think a logical behaviour for disabling "Generate event procedure" in PureBasic settings, should be that event procedure generation is justed "unchecked" in future/new form properties by default, not that existing events code is wiped in the form designer.
Because if disabling "Generate event procedure" also makes changes to already made forms, it would be difficult to have different projects that use different event handling methods (e.g. some projects using BindEvent(), some using event loops, some using EventDesigner etc.).
Am I misunderstanding something, or is the PureBasic Form Designer behaving correctly? I do like the automatic event procedure generation for simpler projects, but I wouldn't use it for all projects.
I was wondering if the following is the intended behaviour of the PureBasic form designer?:
If I disable "Generate event procedure" in File -> Preferences -> Form, this seems to also delete the an existing event procedure in the form that is currently being edited, even though this form already has an event procedure (for example the "Procedure Window_0_Events(event)" part). This seems to happen even if I have checked "Generate events procedure?" in the form properties.
I think a logical behaviour for disabling "Generate event procedure" in PureBasic settings, should be that event procedure generation is justed "unchecked" in future/new form properties by default, not that existing events code is wiped in the form designer.
Because if disabling "Generate event procedure" also makes changes to already made forms, it would be difficult to have different projects that use different event handling methods (e.g. some projects using BindEvent(), some using event loops, some using EventDesigner etc.).
Am I misunderstanding something, or is the PureBasic Form Designer behaving correctly? I do like the automatic event procedure generation for simpler projects, but I wouldn't use it for all projects.