Edgardo Hames
11/5/2004 11:40:00 AM
On Fri, 5 Nov 2004 19:08:42 +0900, gabriele renzi
<rff_rff@remove-yahoo.it> wrote:
> Edgardo Hames ha scritto:
>
> >
> > "KDialog is a wrapper class for KDE kdialog application. kdialog is a
> > simple (easy to use) program which lets you build GUIs for your apps
> > and scripts. The KDialog class tries to bring that simplicity into
> > your Ruby programs."
> >
>
> just a thing. It would be nice it KDialog::NO and KDialog::CANCEL had
> false values (i.e false and nil)
>
> so that you could write
> if Kdialog.new("Test").yesno('Do you like this class?)
> p 'thanks'
> else
> p 'then go playing with curses'
> end
>
Actually, I did think of that, but I didn't know what to do in the
following scenario:
Kdialog.new("Test").yesnocancel('Save and Quit?)
Yes means save and quit
No means !save and quit
Cancel means !quit
How can I differentiate between No and Cancel if they have the same values?
I know I could make Cancel != No, but then would that make Cancel == true?
Bailing out ;)
Ed
--
Despite the surge of power you feel upon learning Ruby,
resist the urge to trip others or slap them in the bald head.
DO NOT LORD YOUR RUBYNESS OVER OTHERS!