neilcsmith-net commented on PR #8799: URL: https://github.com/apache/netbeans/pull/8799#issuecomment-3274508870
What a lot of discussion! :smile: Let's ignore any usage of these values outside of the Dialog API and our implementation. For any other purposes they're unknown Objects that might be equal or identical to each other, and this is not specified anywhere. The values here serve two purposes - input (custom options, etc.) or output (return value) from the Dialog API. On the return values, the only need to differentiate the identities of `OK` and `YES` is if the Dialog can offer both. This is not supported by the standard option sets, and was only supported if you passed both in as custom options. `YES` and `NO` are not specified as supported custom options in the API, although they were supported in the underlying implementation in `NbPresenter`. If you have a dialog that currently has both `OK` and `YES` this change might break it, but if you're doing that you're ignoring the API spec, and quite frankly have bigger UI concerns! The `NbPresenter` implementation code @mbien linked above is changed in this PR to _prefer_ the API supported option (`OK`) while trying to keep the implementation details of supporting `YES` and `NO` as much as possible. That's probably preferable to following the spec to the letter and removing all support for `YES` and `NO` there. That change fixed some of the test issues. It is also worth considering _what_ broke in those tests. The return value test passed, the test failed on the button text. In a lot of the rare cases where this change might affect an application it should be a wrongly labelled button, not functionality. I considered adding some documentation to clarify what the values, identities are. I decided not to at this stage because it potentially locks down the API spec and it might be better to still allow ourselves further leeway in case of regressions. But open to changing that if you think we should? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
