Improving ToolBuilder

Damien Cassou damien.cassou at gmail.com
Tue Sep 18 08:58:42 UTC 2007


Hi,

I've just tried to replace part of OB-Morphic (the framework to build
OmniBrowser interfaces using Morphic) by UIManager.

It worked for:

OBMorphicPlatform>>handleChoiceRequest: request
  | choice |
  choice := (PopUpMenu labelArray: request labels lines: request lines)
                      startUpWithCaption: request prompt.
  ^ request values
      at: choice
      ifAbsent: [nil]

I replace it by:

OBMorphicPlatform>>handleChoiceRequest: request
  ^ UIManager default
       chooseFrom: request labels
       values: request values
       lines: request lines
       title: (request prompt ifNil: [''])


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.

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.

-- 
Damien Cassou



More information about the Squeak-dev mailing list