This might be a completely impractical suggestion, but ....
Something I think is a bit 'messy' with PB is the fact that if you want to do any more 'adventurous' event handling, you have to code a separate callback routine. I've written many PB apps which have a standard PB event loop plus a separate callback procedure. I'm often not sure which events the standard PB event loop will capture compared to the callback, so I have to use trial & error to see what happens. Also, the fact that you end up effectively with two event loops to deal with makes the code much harder to maintain (eg. if you need to communicate between the two event loops using global variables etc.).
I think PB would be much more elegant if there was only ever one type of event loop. At the moment, we have WaitWindowEvent() and WindowEvent() which pick up various events, most commonly PB gadget events. What if these could take an argument like this:
Code: Select all
Event = WaitWindowEvent(#PB_SimpleEvents)
or
Code: Select all
Event = WaitWindowEvent(#PB_AllEvents)
Does this make any sense to anyone?
Don