showModalDialog returning Value


#1

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).


#2

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…


#3

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.


#4

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.