[ENH] Automate User Inputs

Colin Putney cputney at wiresong.ca
Tue Oct 5 17:36:22 UTC 2004


On Oct 5, 2004, at 12:05 PM, Avi Bryant wrote:

>> This changeset will add an enhancement to PopUpMenu and
>> FillInTheBlankMorph such that they can request answers to their
>> questions by signaling a ProvideAnswerNotification.
>
> Another nice thing about this approach, separate from automation, is 
> that it makes #inform: and friends easily cross-UI.  It would be 
> simple for me to have Seaside catch the ProvideAnswerNotification and 
> show a web form if your model sends #confirm: in the context of a web 
> application - I already do this for Warning, for example.  And the 
> same could be done to strip out all the ugly Morphic/MVC checks in 
> those methods, or to support command line interaction (like my 
> REPLServer, if anyone actually uses it).

I use a similar approach for testing in OmniBrowser. The tests can 
catch the notification and supply predictable input - the name of a 
class to be created, say - but under regular use, the notification is 
uncaught and opens a FillInTheBlankMorph to get input from the user.

John's implementation provides good compatibility with existing code, 
but I think in the long term it would be useful to invert the interface 
- rather than have clients go through Morphic, let them throw the 
notifications directly have have Morphic, MVC, Seaside, SUnit, REPL, a 
load script or whatever catch them and deal with them appropriately.

Colin




More information about the Squeak-dev mailing list