https://github.com/wxWidgets/wxWidgets/pull/26026
(5 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Discussion from the other PR was:
Either way, as I wrote, we have the validators and I would really like to know if they actually are used.
Yes, extensively.
There is also wxInitDialogEvent - not sure when you would need that instead of just adding data during dialog creation,
I don't know about this one either.
I propose an event that would get sent across native and generic dialogs when pressing OK and or some other affirmative > button. And events are easier for language bindings than overriding virtual functions across languages. wxWidgets does
almost everything by events. It should do this as well, I think.
Language bindings are a good argument, but in C++ overriding virtual functions is much more convenient. E.g. it allows to call the base class member first, which may be important, while with the events you can only process the event in the derived class and skip it to let the base class have it later.
Anyhow, my fear is that by adding events to the existing mix of virtual functions and validators we risk making things even more confusing as there will be I don't know how many different ways of handling this in a derived class (e.g. "process the event, then skip it to let the base class function use validators for the inherited controls"). Other than language bindings I really don't see a good reason to complicate things further here. I wonder how does wxPython and co handle this now, i.e. do they provide some way of overriding TransferData{To,From}Window() or a replacement mechanism?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Sorry, I don't have much to add here: I think it's a bad idea to add even more ways to handle validation in the dialogs, so I wouldn't apply this. But I'm ready to be overruled if others think it's worth having — so please comment here if you find this useful and would like to have it in wx. Thanks!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@vadz ,
Why not deprecate Validate() and use event?
Thank you.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thank you for your support, but that would break more or less all existing applications, so that was not the intention. I think that adding this event is right because you can do everything with events when handling dialogs, but validation is an exception that bit me.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
One month later, I think it's time to close this one.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()