Improving ToolBuilder
Damien Cassou
damien.cassou at gmail.com
Tue Sep 18 14:07:21 UTC 2007
Hi Andreas,
2007/9/18, Andreas Raab <andreas.raab at gmx.de>:
> Damien Cassou wrote:
> > 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.
>
> On the Squeak's that I have easily access to, it is the same, bit for
> bit. It also seems strange that PopUpMenu would offer a confirm dialog
> with horizontal buttons (the whole idea of PopUpMenu is to present a
> vertical arrangement of choices).
You are perfectly right. I don't know what I was looking at when I saw
these two horizontal buttons.
However, there is a #confirm: method on UIManager, would be cool to
have a #confirm:yesLabel:noLabel: too. In this case, there are two
horizontal buttons
> >>> 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.
>
> Well, I guess then you have a problem. There is currently no alternative
> available in UIManager; it's either that or nothing.
That's why my post was titled 'Improving ToolBuilder'. Is there a way
of changing ToolBuilder?
--
Damien Cassou
More information about the Squeak-dev
mailing list
|