Le 26/10/16 à 16:58, Glenn Cavarlé a écrit :
Denis Kudriashov wrote
I can't take it. Duplication is always bad. There is no reason for it. I agree, is always bad if there is no real reason to duplicate but i think there is a real argument for Bloc. OSWindow cannot be the only one backend for Bloc so Bloc events cannot be based on OSEvents. Why that? We need also a backend for mobile devices with a completely different implementation than the OSWindow one. OSWindow is not adapted for non-window-based platforms like mobiles. For example, on Android, we have to deal with activities and to convert Android events to Bloc events.
So then it means that OSWindowEvents are not useful. But to me this is bloc events that are not needed. I do not get why on android we cannot map android event to OSWindowEvents And do not have duplication in Bloc. We have then SDL events -> OSWindowEvent - Bloc Android event
And BlOSWindowEventHandler will work directly with SDL event with full access to raw event data. No need for intermediate level It is interesting only if performances are substantially improved. Because it is also duplication, you duplicates in Bloc the OSWindow conversion code without any added value. Moreover, this does not prevent the duplication of Event hierarchy. OSWindow is already used in other projects and these users will not be happy if we remove OSEvents ;). who? It is clear that every layer has a cost which should not be neglected. But right now, i think this cost is counterbalanced by the possibility to move transparently on different windowing backends. I'm ok if everybody wants to merge Bloc and OSWindow as a single project but I doubt this is the case.
Regards, Glenn.
----- Glenn Cavarlé -- View this message in context: http://forum.world.st/Bloc-Hierarchy-of-BiEvent-tp4920209p4920265.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.