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 |
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. > 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] |
Hi Andreas,
2007/9/18, Andreas Raab <[hidden email]>: > 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 |
Damien Cassou wrote:
> Hi Andreas, > > 2007/9/18, Andreas Raab <[hidden email]>: >> 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 |
Hi Andreas,
2007/9/18, Andreas Raab <[hidden email]>: > Damien Cassou wrote: > > 2007/9/18, Andreas Raab <[hidden email]>: > >> 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 |
On 9/19/07, Damien Cassou <[hidden email]> wrote: Hi Andreas, Yes. You can create an issue for this on http://bugs.squeak.org/ under the ToolBuilder category. You can assign it to me (mikevdg) if you want. Andreas: do you mind if I become a developer of ToolBuilder? Gulik. |
Michael van der Gulik wrote:
> That's why my post was titled 'Improving ToolBuilder'. Is there a way > of changing ToolBuilder? > > > Yes. You can create an issue for this on http://bugs.squeak.org/ under > the ToolBuilder category. You can assign it to me (mikevdg) if you want. > > Andreas: do you mind if I become a developer of ToolBuilder? Both you and Damien are now developers (see http://squeaksource.com/ToolBuilder.html). Cheers, - Andreas |
2007/9/19, Andreas Raab <[hidden email]>:
> Michael van der Gulik wrote: > > That's why my post was titled 'Improving ToolBuilder'. Is there a way > > of changing ToolBuilder? > > > > > > Yes. You can create an issue for this on http://bugs.squeak.org/ under > > the ToolBuilder category. You can assign it to me (mikevdg) if you want. > > > > Andreas: do you mind if I become a developer of ToolBuilder? > > Both you and Damien are now developers (see > http://squeaksource.com/ToolBuilder.html). Thank you -- Damien Cassou |
In reply to this post by Michael van der Gulik-2
2007/9/19, Michael van der Gulik <[hidden email]>:
> Yes. You can create an issue for this on http://bugs.squeak.org/ under the > ToolBuilder category. You can assign it to me (mikevdg) if you want. I've submitted 3 reports, all assigned to you. Thank you -- Damien Cassou |
Free forum by Nabble | Edit this page |