Hello everyone. Recently existing callbacks behavior was broken once again. This time by https://git.enlightenment.org/core/efl.git/commit/?id=082ea9667343b7016d86143a625881a8c4aa30a4 Before that commit "changed" callback was triggered only on user changes, after - on user changes and changes from code. I understand that in some cases this flow is needed. But previously you could simply trigger your callback after setting value to spinner from code to get desired missing behavior. On the other side - now you can't distinguish value changes made by code from value changes made by user without dirty and painful to support hacks. If you don't want your callback to be triggered by elm_spinner_value_set you need to add some flag meaning "change from code", raise it before every call of value_set, check it inside callback, remove it after the call. And if you want to call it from spinner "changed" callback..? Good luck here. This is possible, but requires additional wrappers around spinner_add and spinner_value_set and replacement with custom signals.
So this change added bigger problems than solved. Some time ago there was discussion on phab about introducing "changed,user" callback to every widget (that has "changed" callback) and making this callbacks behavior consistent through all widgets. Main argument against this was "this will break some existing code". And now only code-breaking part of that idea gets merged without even providing sane way to preserve old flow for those who need it =\. I think it's time to fix this inconsistency. My vision is we should make following changes: 1. "changed" callback should be triggered regardless of change initiator 2. "changed,user" callback should be triggered on user-made changes 3. (optional) there should be way to make changes from code as if they were made by user. This includes not only issuing "changed,user" callback, but also checking if that action is possible (i.e. widget should be enabled, be in editable mode, etc.) 4. (optional) add pre-changed callbacks? I'd like to hear your opinion on this topic. -- *Best Regards, Andrii Kroitor * Engineer, Tizen Platform Lab Samsung R&D Institute Ukraine 57, Lva Tolstogo St., Kyiv 01032, Ukraine email: [email protected] <mailto:[email protected]> ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
