Hi I kind of agree on this one. So what is the preferred solution. Now this is important to be able to distinguish an empty string from a cancel. Stef
Begin forwarded message: > From: [email protected] > Date: September 26, 2009 5:07:13 AM CEDT > To: [email protected] > Subject: Issue 1129 in pharo: UIManager #request: and > #multilineRequest do not distinguish between empty and cancel > > > Comment #17 on issue 1129 by andreas.raab: UIManager #request: and > #multilineRequest do not distinguish between empty and cancel > http://code.google.com/p/pharo/issues/detail?id=1129 > > Can I ask to reopen this issue before 1.0 goes out? It introduces a > superficial > incompatibility between Pharo and Squeak or other external code that > is really > unecessary. There are two excellent alternatives: > > 1) Extend the existing protocol, by means of, e.g, > result := UIMananger default request: 'What is your name?' onCancel: > ["whatever"]. > This allows for a simple and straightforward use in cases where one > needs to > distinguish between cancel and empty return and it trivially extends > to uses of > multiLineRequest: as well re requestPassword:. > > 2) Alternatively, introduce a new protocol and deprecate the old > one. For example: > result := UIManager default ask: 'What is your name?'. > With a changed protocol any breakage is straightforward and obvious > and not subtle > and in corner cases that may not be tested for by some external > code. Plus, it is > possible to provide a compatibility layer where necessary. > > From my point of view both of the above are far better solutions and > do not require > any additional work. > > > -- > You received this message because you are listed in the owner > or CC fields of this issue, or because you starred this issue. > You may adjust your issue notification preferences at: > http://code.google.com/hosting/settings _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
