[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[KDIALOG] kdialog-0.2

Edgardo Hames

11/5/2004 5:31:00 AM

Hello dear Rubyists,

I finally managed to complete the implementation of the kdialog
wrapper. This new version includes progress bar and icon support.

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

For those anxious to try it out, just point your browser to
http://kdialog.rub... or
http://rubyforge.org/project...

I have developed it under Gentoo + KDE 3.3.1. However, you should be
able to use it on any version of KDE >=3.1 without modifications.

Please, send me suggestions, contributions and feedback.

Hope you enjoy it!
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!


7 Answers

David Ross

11/5/2004 5:34:00 AM

0

Edgardo Hames wrote:

>Hello dear Rubyists,
>
>I finally managed to complete the implementation of the kdialog
>wrapper. This new version includes progress bar and icon support.
>
>"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."
>
>For those anxious to try it out, just point your browser to
>http://kdialog.rub... or
>http://rubyforge.org/project...
>
>I have developed it under Gentoo + KDE 3.3.1. However, you should be
>able to use it on any version of KDE >=3.1 without modifications.
>
>Please, send me suggestions, contributions and feedback.
>
>Hope you enjoy it!
>Ed
>
>
Hey, nice work. I was wondering when someone would start hitting the
desktop embedded software. Keep up the good work.

David Ross
--
Hazzle free packages for Ruby?
RPA is available from http://www.rubyar...



gabriele renzi

11/5/2004 10:08:00 AM

0

Edgardo Hames ha scritto:
> Hello dear Rubyists,
>
> I finally managed to complete the implementation of the kdialog
> wrapper. This new version includes progress bar and icon support.
>
> "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."
>
> For those anxious to try it out, just point your browser to
> http://kdialog.rub... or
> http://rubyforge.org/project...
>
> I have developed it under Gentoo + KDE 3.3.1. However, you should be
> able to use it on any version of KDE >=3.1 without modifications.
>
> Please, send me suggestions, contributions and feedback.

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

Edgardo Hames

11/5/2004 11:40:00 AM

0

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!


gabriele renzi

11/5/2004 1:35:00 PM

0

Edgardo Hames ha scritto:
> 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'm not suggestint to have the same values :)
I'm suggesting to have false for No and nil for Cancel.
This way you could do:


res=Kdialog.new("Test").yesnocancel('Save and Quit?)
if res
save and quit
else
resume_main_loop if res.nil?
end
# the only other case where res != true is res==false


Edgardo Hames

11/5/2004 3:39:00 PM

0

On Fri, 5 Nov 2004 22:48:44 +0900, gabriele renzi
<rff_rff@remove-yahoo.it> wrote:
> Edgardo Hames ha scritto:
>
> >>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'm not suggestint to have the same values :)
> I'm suggesting to have false for No and nil for Cancel.

OK.Now it makes sense to me ;)

> # the only other case where res != true is res==false

I guess so... :-S but I didn't understand your idea in the first message.

Thanks for your suggestions,
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!


David Ross

11/5/2004 4:09:00 PM

0

Edgardo Hames wrote:

>Hello dear Rubyists,
>
>I finally managed to complete the implementation of the kdialog
>wrapper. This new version includes progress bar and icon support.
>
>"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."
>
>For those anxious to try it out, just point your browser to
>http://kdialog.rub... or
>http://rubyforge.org/project...
>
>I have developed it under Gentoo + KDE 3.3.1. However, you should be
>able to use it on any version of KDE >=3.1 without modifications.
>
>Please, send me suggestions, contributions and feedback.
>
>Hope you enjoy it!
>Ed
>
>
Do you plan on writing other wrappers for more KDE programs?

David Ross
--
Hazzle free packages for Ruby?
RPA is available from http://www.rubyar...



Edgardo Hames

11/5/2004 4:45:00 PM

0

On Sat, 6 Nov 2004 01:09:09 +0900, David Ross <dross@code-exec.net> wrote:
> Edgardo Hames wrote:
>
> >I finally managed to complete the implementation of the kdialog
> >wrapper. This new version includes progress bar and icon support.
> >
> Do you plan on writing other wrappers for more KDE programs?
>

I found a kdialog wrapper useful for another project I'm working on.
But depending on your suggestions, I might consider them. Were you
thinking on a specific app?

Feel free to send me any ideas or suggestions.
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!