This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Scala Swing Dialogs

3 replies
Landei
Joined: 2008-12-18,
User offline. Last seen 45 weeks 4 days ago.

Hi!

Some months ago I opened ticket #1922, where I asked to support not only
Strings in the Scala-Swing Dialog methods (showOptions, showConfirmation,
showMessage). The issue is marked as fixed, and the current version
(relocated to RichWindow.scala) is much better.

So I'm not really sure if I should be so impudent to nag here again. The
current implementation takes the message parameter of type Any and calls
JOptionPane.showXXX with exactly this parameter. This means that if you
actually want to see your Scala-Swing Component myIncredibleComp in the
Dialog (and not its toString representation), you have to call the Dialog
method with myIncredibleComp.peer. Of course, it's no big deal, but I guess
it's still pretty confusing for novices.

What do you think, is this worth a new ticket or not?

Cheers,
Daniel

odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: Scala Swing Dialogs

On Sun, Jan 10, 2010 at 8:06 PM, Landei wrote:
>
> Hi!
>
> Some months ago I opened ticket #1922, where I asked to support not only
> Strings in the Scala-Swing Dialog methods (showOptions, showConfirmation,
> showMessage). The issue is marked as fixed, and the current version
> (relocated to RichWindow.scala) is much better.
>
> So I'm not really sure if I should be so impudent to nag here again. The
> current implementation takes the message parameter of type Any and calls
> JOptionPane.showXXX with exactly this parameter. This means that if you
> actually want to see your Scala-Swing Component myIncredibleComp in the
> Dialog  (and not its toString representation), you have to call the Dialog
> method with myIncredibleComp.peer. Of course, it's no big deal, but I guess
> it's still pretty confusing for novices.
>
> What do you think, is this worth a new ticket or not?
>
Yes, no problem. If you want to propose a patch, that's even better.

Thanks

Kevin Wright
Joined: 2009-06-09,
User offline. Last seen 49 weeks 3 days ago.
Re: Scala Swing Dialogs
I'll take a look at this one if I can find any time at some point this week...

2010/1/13 martin odersky <martin [dot] odersky [at] epfl [dot] ch>
On Sun, Jan 10, 2010 at 8:06 PM, Landei <Daniel [dot] Gronau [at] gmx [dot] de> wrote:
>
> Hi!
>
> Some months ago I opened ticket #1922, where I asked to support not only
> Strings in the Scala-Swing Dialog methods (showOptions, showConfirmation,
> showMessage). The issue is marked as fixed, and the current version
> (relocated to RichWindow.scala) is much better.
>
> So I'm not really sure if I should be so impudent to nag here again. The
> current implementation takes the message parameter of type Any and calls
> JOptionPane.showXXX with exactly this parameter. This means that if you
> actually want to see your Scala-Swing Component myIncredibleComp in the
> Dialog  (and not its toString representation), you have to call the Dialog
> method with myIncredibleComp.peer. Of course, it's no big deal, but I guess
> it's still pretty confusing for novices.
>
> What do you think, is this worth a new ticket or not?
>
Yes, no problem. If you want to propose a patch, that's even better.

Thanks

Landei
Joined: 2008-12-18,
User offline. Last seen 45 weeks 4 days ago.
Re: Scala Swing Dialogs

Kevin Wright-4 wrote:
>
> I'll take a look at this one if I can find any time at some point this
> week...
>
> 2010/1/13 martin odersky
>
>> On Sun, Jan 10, 2010 at 8:06 PM, Landei wrote:
>> >
>> > Hi!
>> >
>> > Some months ago I opened ticket #1922, where I asked to support not
>> only
>> > Strings in the Scala-Swing Dialog methods (showOptions,
>> showConfirmation,
>> > showMessage). The issue is marked as fixed, and the current version
>> > (relocated to RichWindow.scala) is much better.
>> >
>> > So I'm not really sure if I should be so impudent to nag here again.
>> The
>> > current implementation takes the message parameter of type Any and
>> calls
>> > JOptionPane.showXXX with exactly this parameter. This means that if you
>> > actually want to see your Scala-Swing Component myIncredibleComp in the
>> > Dialog (and not its toString representation), you have to call the
>> Dialog
>> > method with myIncredibleComp.peer. Of course, it's no big deal, but I
>> guess
>> > it's still pretty confusing for novices.
>> >
>> > What do you think, is this worth a new ticket or not?
>> >
>> Yes, no problem. If you want to propose a patch, that's even better.
>>
>> Thanks
>>
>> -- Martin
>>
>
>
>

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland