Improving ToolBuilder

Andreas Raab andreas.raab at gmx.de
Tue Sep 18 09:28:24 UTC 2007


Damien Cassou wrote:
> 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.

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).

>>> 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.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list