3 ms·
> why can't a UI framework give me a "YesNoModalPopup" that looks and acts however a "YesNoModalPopup" is supposed to act on the respective OS As a simple coun
by gurkendoktor 10y ago
> why can't a UI framework give me a "YesNoModalPopup" that looks and acts however a "YesNoModalPopup" is supposed to act on the respective OS
As a simple counter-example, macOS rarely uses Yes/No/OK/Cancel buttons. Instead, dialog buttons have meaningful names based on the task at hand, e.g. "Overwrite File" and "Keep Old File".
- derefr 10y agoThat's exactly what I meant, though. "YesNoModalPopup" is the name of a semantic behavioural contract, not a concrete implementation class whose name describes what you'll see. In instantiating a YesNoModalPopup, there would be required fields for button labels—even though those field-values will only be used on OSX. With an abstract+declarative toolkit, you would still have to do just as much customization toward your use-case as you would if you were writing one view class for each GUI. You just get to skip the marginal cost of everything that's not that customization. You can have a single code path to create, and show, and receive input from, the instance of the pop-up abstraction.