Improving ToolBuilder

Damien Cassou damien.cassou at gmail.com
Tue Sep 18 09:15:07 UTC 2007


Hi Andreas,

2007/9/18, Andreas Raab <andreas.raab at gmx.de>:
> Damien Cassou wrote:
> > But how can I change
> >
> > OBMorphicPlatform>>handleConfirmationRequest: request
> >   ^ PopUpMenu
> >         confirm: request prompt
> >         trueChoice: request okChoice
> >         falseChoice: request cancelChoice
> >
> > There is no such method in UIManager.
>
> ^UIManager default
>         chooseFrom: {request okChoice. request cancelChoice}
>         values: {true. false}
>         title: request prompt.


This is not the same thing. With the other method, there are 2 buttons
with coloured icons. This looks more like a confirmation dialog.


>
> > And this one:
> >
> > OBMorphicPlatform>>handleTextRequest: request
> >   ^ FillInTheBlankMorph
> >        request: request prompt
> >        initialAnswer: request template
> >        centerAt: Sensor cursorPoint
> >        inWorld: World
> >        onCancelReturn: nil
> >        acceptOnCR: true
> >
> > There is no way of returning nil on Cancel. The empty string is always returned.
>
> ^(UIMananger default
>         request:request prompt
>         initialAnswer: request template) ifEmpty:[nil]

There is a difference if the user really wants an empty string so this
does not work either.


-- 
Damien Cassou



More information about the Squeak-dev mailing list