Julian wrote:...un-check "Generate events procedure?". This will stop PB from generating the code for the window ... This is the part that is depricated, as support for callbacks are now included and are much much better than the old WaitWindowEvent and WindowEvent into a Select statement methods as above.
Search "BindEvent" in the help for an example of how to start using this method...
Hello Julian. Please allow me to interject with some points.
Firstly, and most importantly, it should be noted that the event loop and corresponding procedures are still an integral part of the PureBasic programming structure, and have in no way been deprecated or replaced. The
WindowEvent()/WaitWindowEvent() commands in the event loop form the very backbone of any PureBasic window-based program.
While callbacks are useful, it would simply not be practical to bind every event to one. They are intended for use
in conjunction with the
WindowEvent()/WaitWindowEvent() commands
(as required), and not in lieu of them:
The PureBasic Manual - BindEvent() wrote:Bind an event to a callback. It's an additional way to handle events in PureBasic, which works without problem with the regulars WindowEvent() / WaitWindowEvent() commands.
They remain as options in the form designer properties and preferences settings only to afford developers the choice of implementing them either within the form code itself, or in external modules.
Not as a do-away.
In clarification, it is the old form designer that is deprecated, superseded by the current form designer which revamps some old features and spots some new ones as well.
Please do correct me if I'm wrong.
