srod wrote:As much as I like OOP, I don't see how OOP is needed in order to make good use of event-handlers?
If you take a look at his requested event syntax it's clear that it would become a gigantic mess of replication. OOP would be a prefered solution to avoid this to overload the event handlers to make them more generic. Also, the way the event 'object' (structure) is passed as a parameter is again replication. Obviously you wouldn't have a seperate event object for each event, you just pass a generic one which contains information about what event just happened. See C#'s event system, it works this way.
Altering Halodri's request to give it the 'generic' capabilities to which you refer is simplicity itself.
EasyVENT does not use OOP and its event handlers are generic in the sense that an individual handler can be used for an individual event and an individual control/window or for a whole bunch of events and/or controls. There need be no replication with either the handlers or the 'event objects'. My point is that, well, EasyVENT has demonstrated that such an event system can be very effective for a non-OOP language. The proof of the pudding is in the eating and no one eats as much pud as me... except fangbeast maybe!
A crossplatform system of event-handlers would be very nice indeed.
I may look like a mule, but I'm not a complete ass.
DoubleDutch wrote:Yes, a cross platform (built-in and 'official') system like EasyVent would be great.
Simply the possibility to get more native Events (or at least just the same type of Events on all platforms) would be a helpful improvement.
Both would be great. Without the possibility to get more native Events it is impossible to write own Gadgets and you have to implement different solutions for Windows, Linux and MacOS. As most people use PureBasic for Windows, almost all user written Gadgets are only for Windows.
I think PureBasic has a great potential for beginners and users who want to write multiplatform programs, but many advanced commands are missing if you want to create something bigger. I think the community would like to improve the default Libaries, if they could, and Fred would not have to do all the work. I would for example like to implement a String subsystem which is not based on a string base, which can cause problems in some situations, but it is simply impossible. I think it would be a greater deal if the community could improve the libaries. Would it not be better if someone just could add a flag somewhere in the code of the Comoboxgadget instead of hacking it ?