Opcode wrote:I honestly think the Form Designer needs to be able to update the current project when switching from the code view back to the design view. This way you can do "advanced" edits to the code and the designer will automatically inherit the updated code.
Hello Opcode. Polo's right; any changes to the form layout or events
that have been generated by Form Designer can be modified programmatically, and such changes will be preserved and even visually updated in the form view. However,
additions of gadgets or events via code are not recognised or honoured, although that would be nice too.
In any case, all other variables, constants, events, and code in general, should be processed and handled by the main program, with the
.pbf code acting only as a "ready-made plugin" of the pre-designed form. This is similar to the model employed by VB6, which hides its form code from view altogether, allowing additions and modifications to the form only via the object view of its IDE.
Alternatively, you could simply use Form Designer to generate the initial template of your form, along with the event handlers if you wish, and then save it as a normal PureBasic
.pb source file, which you can then directly code into. However, you'd lose the ability to visually edit the form further, or, if you attempted to revert it back to a Form Designer
.pbf file, you'd lose all your added code.
Just some options, to be exercised with great care!
