showModalDialog returning Value


What do you think, does it worth the change ?

The idea is that it would probably simplify code (getting dialog results in one shot instead of query it after the runModal).


You mean changing all the modal stuff to return a var instead of an int? Makes a lot of sense, I guess, but there are a lot of places in the code that’d need tweaking…


The real interest would be in merging the modal and modalless dialog behaviour.
If the dialog uses a value, we could attach a listener to it and have it work in modaless mode or modal mode exactly the same way (showModalDialog becoming a value listener).
Anyway, I’ve never seen this anywhere else so it might not be feasible.


You don’t need to change anything to do that - just give your dialog some controls that take a Value, and everything will be updated when you change them. None of that stuff cares whether something is modal or not.