[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: Thoughts about native Ruby widget set

Kero van Gelder

11/3/2003 10:27:00 PM

> If I understand correctly Gutopia is sort of abstraction layer for
> low-level toolkit backends, It seems quite interesting although the
> codebase in question seems to be a bit in stagnation(No CVS commits in
> the last few months).

Both GUtopIa and Rouge aim for higher level abstractions. correct.
Both also tend to be low on activity (while the ideas are pretty good).

I've also heard the argument Ruby does not need yet-another-toolkit, but
needs something to improve upon toolkits and distinguish itself in some
way that's Ruby-like. I think that's a valid argument.

>>>I am taking first steps in this direction, experimenting with RubyX11, I just
>>>wonder if someone else has already started working on a similar idea...
>>>
>>>url is welcome!
>>>
> As soon as something will be available, I didn't do any low-level X11
> coding in the past, so currently I have only primitive Window widget:-|

btw, Wise uses libX11 (so a C-binding instead of RubyX11), but its aim is
similar to what you want. Do you feel cooperation is an option? A toolkit
is a daunting task :)

Bye,
Kero.
14 Answers

ser

11/7/2003 7:56:00 PM

0

"Kero van Gelder" <kero@chello.nl> wrote in message news:<pan.2003.03.20.21.35.31.1956@chello.nl>...
> Both GUtopIa and Rouge aim for higher level abstractions. correct.
> Both also tend to be low on activity (while the ideas are pretty good).

Hi,

I've been working on this, off and on, for a while. I posted some
code a while back, but was waiting until it was actually usable in
small projects before I did a major release. I've been struggling
with some usage issues, and the good news is that I think I've got a
coherent solution.

The project started out proving the layered concept: there are
high-level APIs that programmers use, mid-level APIs that generate the
GUI code, and low-level APIs that actually draw the widgets. I used
FOX as the low-level API, but was hoping to get enough low-level
layers to make the toolkit able to run on any desktop, with the
assumption that most people will have *some* Ruby GUI toolkit
installed.

What I have so far is a really basic XUL interpreter, so you can write
the GUI in XUL and run the parser on it, and you get a FOX/Ruby GUI.
There is also a programmatic high-level API that's fairly uninspiring,
but doesn't require XUL knowledge.

The thing that bothered me most was the binding/callback mechanism.
One thing I'd like to do is be able to use GUI servers. These are
services that run as part of the Desktop system, and answer RPC calls
to generate GUI elements. There are a number of these projects, and I
feel as if there's some real potential there, especially for scripting
languages. Currently, the bindings are specified in the XUL code, or
in the Ruby code as callbacks. I've decided that I don't particularly
like this, so I'm trying a new approach.

My current fancy is to use the signal/slot metaphor, in the hopes that
this will further detach the View from the Control. The GUI will be
created however it is created, and the application will attach methods
to GUI elements in the publish/subscribe method.


So, what this will all look like is something like this:

--- 1 ---
require 'rouge/zool'

tk = Rouge::Zool::parse( File.new( "ui.xul" ) )
tk.listen( "submit_button", "onClick", proc { puts "Hello World" } )
# Proc or Method
tk.start

--- 2 ---
require 'rouge/builder'

tk = Rouge::Builder.new
tk.window( "Rouge Demo" ) {
tk.button( "Submit", "submit_button" ) { puts "Hello World" }
}
tk.listen( "submit_button", "onClick", proc { puts "And goodbye,
too!" })
# Two listeners
tk.start


Now, that's just the front end. The back ends can be just about
anything that you can code a middle layer for; middle layers are a
single class that implements a bunch of methods, like:

# Creates a button with some text
def button( title )

and so on.

I'll post a link to a project page pretty soon. There is no
documentation, and I have *very* little time right now to answer
questions, so I've been sort of hesitant to do so.

Notice that this is all high-level stuff, which is a far cry from the
original topic of "native Ruby widget sets". There are two kinds of
"native": the kind that means "pure Ruby", and the kind that means
"using the user's native environment". As a user, I prefer the latter
to the former. As a programmer, I don't care, as long as the API I'm
using to create the GUI is really, really easy to use, and the end
result doesn't suck. The interesting problem, for me, therefore is
creating a really nice programmer's API that can use any number of
back-ends, thereby empowering people to use the GUI widget set that
they prefer.

Sorry for the spelling errors; this was posted through Google Groups.

[2Le]

8/31/2010 1:54:00 AM

0

Da'm chu*`ng ba'c che^ oan cho WD -do' nghen, ca'i WDTV ra
-do*`i na(m ngoa'i -thi` -du'ng la` ho^?ng ngon, notoriously slow,
nhu*ng to*'i nay no' -da~ up model 2 la^`n tha`nh WDTV Live
ro^`i Live Plus. Ne^'u ba'c phe^ bi`nh ngay ca? hai models mo*'i
na`y va^~n thua xa O!Play thi` please confirm -de^? tui bie^'t
tui ne' hen, thanks.


On Aug 31, 5:22 am, LTSG <laotamsai...@yahoo.com> wrote:
> Huynh  mua WD la` ho+i la^`m ro^`i ddo' nghen  .   Da^n Bie^'t thi`
> kho^ng mua WD ma` mua  O!PLAY HR-1 do tu.i ASUS la`m gia' co+? 6, 7
> chu.c , hoa(.c mua tha(`ng Briteview gia' co+?  80, mua loa.i
> Recertified thi` chu+`ng 60 ma` cu~ng cha.y ngon la`nh nhu+ thu+o
> +`ng .
>
> http://www.brite-view.com...
>
> Loa.i WD cha.y e. la('m, thua xa  O!Play hay Briteview .   Mua ma^'y
> loa.i na`y xong thi` nho+' vo^ website cu?a no'  update ca'i firmware
> (ra^'t de^~ )  dde^? cha.y ngon ho+n .
>
> Btw, nho+' mua the^m 1 ca'i 1 or 2 TB portable hard drive dde^? ga('n
> va`o, xem phim dde^'n che^'t luo^n cu~ng kho^ng he^'t  :)  .
>
> Nho+' la` loa.i bo? tu'i  portable HD xa`i usb power nha, chu+'  ham
> re? mua loa.i bulky kia pha?i xa`i  AC power source phie^`n phu+'c
> le'm  .   1TB costs chu+`ng 80 ha`  :-))))
>
> On Aug 24, 7:44 pm, jupiterean <jupiter...@gmail.com> wrote:
>
>
>
> > OK today I threw out my DVD player and entered a new age in home
> > entertainment.
>
> > I got my movies in my 2TB external hard disk, the size of a hardcover
> > book
>
> > Then I got a media player by western digital, the size of a pocket
> > book but a bit thicker
>
> > Then I connected my hard disk to the media player, then the media
> > player to the TV
>
> > Now with a remote control I can watch more than 300 movies stored in
> > my hard disk without bothering about the DVDs. Technically, for right
> > now I have only 10 movies  :-)))))))))

jupiterean

8/31/2010 2:22:00 AM

0

On Aug 30, 9:54 pm, "[2Le]" <sir...@gmail.com> wrote:
> Da'm chu*`ng ba'c che^ oan cho WD -do' nghen, ca'i WDTV ra
> -do*`i na(m ngoa'i -thi` -du'ng la` ho^?ng ngon, notoriously slow,
> nhu*ng to*'i nay no' -da~ up model 2 la^`n tha`nh WDTV Live
> ro^`i Live Plus. Ne^'u ba'c phe^ bi`nh ngay ca? hai models mo*'i
> na`y va^~n thua xa O!Play thi` please confirm -de^? tui bie^'t
> tui ne' hen, thanks.
>

tui xa`i WDTV live plus tha^'y to^'t la('m kho^ng che^ cho^~ na`o
he^'ch ca?

tu co' the^? -dem ra best buy tra? la.i ro^`i order on line re? ho+n -
du+o+.c ma^'y chu.c nhu+ng ma` tui ie^u no' qua' kho^ng -da`nh xa em
ne^n tho^i :-)))))))))))

:))

8/31/2010 2:34:00 AM

0

On Aug 30, 7:21 pm, jupiterean <jupiter...@gmail.com> wrote:
> On Aug 30, 9:54 pm, "[2Le]" <sir...@gmail.com> wrote:
>
> tu co' the^? -dem ra best buy tra? la.i ro^`i order on line re? ho+n -
> du+o+.c ma^'y chu.c nhu+ng ma` tui ie^u no' qua' kho^ng -da`nh xa em
> ne^n tho^i  :-)))))))))))
----------------------------------------------------------------------------------------------------------------------
Tra? la.i ddi ! Complain la` tu.i bay ba'n ma('c qua'.

Tao mua be^n China gia' re? re^` a`...nhie^`u khi no' se~ xin lo^~i
mi`nh va` su*?a la.i gia' ca?... -- Pay back the differences.

Ma^'y chu.c ddo^`ng cu~ng la` tie^`n va^.y... :-)

http://www.bestbuy.com/site/Western+Digital+-+WDTV+Live+Plus+HD+Media+Player/9945474.p?skuId=9945474&id=121...

http://www.pcmag.com/article2/0,2817,2366...

tuna

8/31/2010 9:53:00 AM

0


Cho phe'p em na`y ddi du+. thi hoa ha^.u (no' la` hoa ha^.u na(m 09)
co' ddu+o+.c kho^ng ?
Co' ma^'y models, low mid to hi.
Nhu+ng gia' ca? thi` ba'n nu+?a gia' ho.a may nhie^`u ngu+o+`i
mua :-)))

http://dune-hd.com/hd_player...

tuna,

------------
On Aug 30, 6:54 pm, "[2Le]" <sir...@gmail.com> wrote:
> Da'm chu*`ng ba'c che^ oan cho WD -do' nghen, ca'i WDTV ra
> -do*`i na(m ngoa'i -thi` -du'ng la` ho^?ng ngon, notoriously slow,
> nhu*ng to*'i nay no' -da~ up model 2 la^`n tha`nh WDTV Live
> ro^`i Live Plus. Ne^'u ba'c phe^ bi`nh ngay ca? hai models mo*'i
> na`y va^~n thua xa O!Play thi` please confirm -de^? tui bie^'t
> tui ne' hen, thanks.
>
> On Aug 31, 5:22 am, LTSG <laotamsai...@yahoo.com> wrote:
>
> > Huynh  mua WD la` ho+i la^`m ro^`i ddo' nghen  .   Da^n Bie^'t thi`
> > kho^ng mua WD ma` mua  O!PLAY HR-1 do tu.i ASUS la`m gia' co+? 6, 7
> > chu.c , hoa(.c mua tha(`ng Briteview gia' co+?  80, mua loa.i
> > Recertified thi` chu+`ng 60 ma` cu~ng cha.y ngon la`nh nhu+ thu+o
> > +`ng .
>
> >http://www.brite-view.com...
>
> > Loa.i WD cha.y e. la('m, thua xa  O!Play hay Briteview .   Mua ma^'y
> > loa.i na`y xong thi` nho+' vo^ website cu?a no'  update ca'i firmware
> > (ra^'t de^~ )  dde^? cha.y ngon ho+n .
>
> > Btw, nho+' mua the^m 1 ca'i 1 or 2 TB portable hard drive dde^? ga('n
> > va`o, xem phim dde^'n che^'t luo^n cu~ng kho^ng he^'t  :)  .
>
> > Nho+' la` loa.i bo? tu'i  portable HD xa`i usb power nha, chu+'  ham
> > re? mua loa.i bulky kia pha?i xa`i  AC power source phie^`n phu+'c
> > le'm  .   1TB costs chu+`ng 80 ha`  :-))))
>
> > On Aug 24, 7:44 pm, jupiterean <jupiter...@gmail.com> wrote:
>
> > > OK today I threw out my DVD player and entered a new age in home
> > > entertainment.
>
> > > I got my movies in my 2TB external hard disk, the size of a hardcover
> > > book
>
> > > Then I got a media player by western digital, the size of a pocket
> > > book but a bit thicker
>
> > > Then I connected my hard disk to the media player, then the media
> > > player to the TV
>
> > > Now with a remote control I can watch more than 300 movies stored in
> > > my hard disk without bothering about the DVDs. Technically, for right
> > > now I have only 10 movies  :-)))))))))

tuna

8/31/2010 10:01:00 AM

0

On Aug 31, 2:53 am, tuna <tu...@nz11.com> wrote:
> Cho phe'p em na`y ddi du+. thi hoa ha^.u (no' la` hoa ha^.u na(m 09)
> co' ddu+o+.c kho^ng ?
> Co' ma^'y models, low mid to hi.
> Nhu+ng gia' ca? thi` ba'n nu+?a gia' ho.a may nhie^`u ngu+o+`i
> mua :-)))
>
> http://dune-hd.com/hd_player...
>
No' co`n co' ba'n o+? Sa`i Go`n nu+~a, nhu+ng kho^ng pie^'t la` bao
nhie^u ?
http://dune-hd.com/wh...

ha ha ha

> tuna,
>
> ------------
> On Aug 30, 6:54 pm, "[2Le]" <sir...@gmail.com> wrote:
>
> > Da'm chu*`ng ba'c che^ oan cho WD -do' nghen, ca'i WDTV ra
> > -do*`i na(m ngoa'i -thi` -du'ng la` ho^?ng ngon, notoriously slow,
> > nhu*ng to*'i nay no' -da~ up model 2 la^`n tha`nh WDTV Live
> > ro^`i Live Plus. Ne^'u ba'c phe^ bi`nh ngay ca? hai models mo*'i
> > na`y va^~n thua xa O!Play thi` please confirm -de^? tui bie^'t
> > tui ne' hen, thanks.
>
> > On Aug 31, 5:22 am, LTSG <laotamsai...@yahoo.com> wrote:
>
> > > Huynh  mua WD la` ho+i la^`m ro^`i ddo' nghen  .   Da^n Bie^'t thi`
> > > kho^ng mua WD ma` mua  O!PLAY HR-1 do tu.i ASUS la`m gia' co+? 6, 7
> > > chu.c , hoa(.c mua tha(`ng Briteview gia' co+?  80, mua loa.i
> > > Recertified thi` chu+`ng 60 ma` cu~ng cha.y ngon la`nh nhu+ thu+o
> > > +`ng .
>
> > >http://www.brite-view.com...
>
> > > Loa.i WD cha.y e. la('m, thua xa  O!Play hay Briteview .   Mua ma^'y
> > > loa.i na`y xong thi` nho+' vo^ website cu?a no'  update ca'i firmware
> > > (ra^'t de^~ )  dde^? cha.y ngon ho+n .
>
> > > Btw, nho+' mua the^m 1 ca'i 1 or 2 TB portable hard drive dde^? ga('n
> > > va`o, xem phim dde^'n che^'t luo^n cu~ng kho^ng he^'t  :)  .
>
> > > Nho+' la` loa.i bo? tu'i  portable HD xa`i usb power nha, chu+'  ham
> > > re? mua loa.i bulky kia pha?i xa`i  AC power source phie^`n phu+'c
> > > le'm  .   1TB costs chu+`ng 80 ha`  :-))))
>
> > > On Aug 24, 7:44 pm, jupiterean <jupiter...@gmail.com> wrote:
>
> > > > OK today I threw out my DVD player and entered a new age in home
> > > > entertainment.
>
> > > > I got my movies in my 2TB external hard disk, the size of a hardcover
> > > > book
>
> > > > Then I got a media player by western digital, the size of a pocket
> > > > book but a bit thicker
>
> > > > Then I connected my hard disk to the media player, then the media
> > > > player to the TV
>
> > > > Now with a remote control I can watch more than 300 movies stored in
> > > > my hard disk without bothering about the DVDs. Technically, for right
> > > > now I have only 10 movies  :-)))))))))

jupiterean

8/31/2010 2:02:00 PM

0

On Aug 31, 5:53 am, tuna <tu...@nz11.com> wrote:
> Cho phe'p em na`y ddi du+. thi hoa ha^.u (no' la` hoa ha^.u na(m 09)
> co' ddu+o+.c kho^ng ?
> Co' ma^'y models, low mid to hi.
> Nhu+ng gia' ca? thi` ba'n nu+?a gia' ho.a may nhie^`u ngu+o+`i
> mua :-)))
>
> http://dune-hd.com/hd_player...
>

U?a gia' bao nhie^u kho^ng tha^'y no'i ?

ne^'u chu+`ng 5 nga`n ba.c thi` tui mua chu.c ca'i cho cha(?
n :-)))))))))))

jupiterean

8/31/2010 2:03:00 PM

0

On Aug 31, 5:53 am, tuna <tu...@nz11.com> wrote:
> Cho phe'p em na`y ddi du+. thi hoa ha^.u (no' la` hoa ha^.u na(m 09)
> co' ddu+o+.c kho^ng ?
> Co' ma^'y models, low mid to hi.
> Nhu+ng gia' ca? thi` ba'n nu+?a gia' ho.a may nhie^`u ngu+o+`i
> mua :-)))
>
> http://dune-hd.com/hd_player...
>
> tuna,

U?a gia' bao nhie^u kho^ng tha^'y no'i ?

ne^'u chu+`ng 5 nga`n ba.c thi` tui mua chu.c ca'i cho cha(?
n :-)))))))))))

Omega

8/31/2010 2:42:00 PM

0

On Tue, 31 Aug 2010 07:01:54 -0700 (PDT), jupiterean <jupiterean@gmail.com>
wrote:

> On Aug 31, 5:53 am, tuna <tu...@nz11.com> wrote:
> > Cho phe'p em na`y ddi du+. thi hoa ha^.u (no' la` hoa ha^.u na(m 09)
> > co' ddu+o+.c kho^ng ?
> > Co' ma^'y models, low mid to hi.
> > Nhu+ng gia' ca? thi` ba'n nu+?a gia' ho.a may nhie^`u ngu+o+`i
> > mua :-)))
> >
> > http://dune-hd.com/hd_player...
> >
>
> U?a gia' bao nhie^u kho^ng tha^'y no'i ?
>
> ne^'u chu+`ng 5 nga`n ba.c thi` tui mua chu.c ca'i cho cha(?
> n :-)))))))))))

Tha^'y ghe~ qua' ro^`i bi. shock ca` la(m post to+'i 2 la^`n lu+.ng ha~ -:)

Theo tui thi` ddu+`ng ne^n cho+i ma^'y tha(`ng exotic la. qua('c, cho+i
ddo^` hie^.u no' co`n co' forum dde^~ mi`nh mo` dzo^ get tips & mod
firmware nu+~a cho+' ...

Ca'i FreeAgent cu~a tui play ddu+o+.c Blu-ray cho+' sao hong, chi~ play
hong ddu+o+.c menu tho^i co`n phinh thi` ok -:)

Omega

Omega

9/5/2010 10:57:00 PM

0

On Tue, 31 Aug 2010 16:41:44 +0200, Omega <omegans@gmx.net> wrote:

:>On Tue, 31 Aug 2010 07:01:54 -0700 (PDT), jupiterean <jupiterean@gmail.com>
:>wrote:
:>
:>> On Aug 31, 5:53 am, tuna <tu...@nz11.com> wrote:
:>> > Cho phe'p em na`y ddi du+. thi hoa ha^.u (no' la` hoa ha^.u na(m 09)
:>> > co' ddu+o+.c kho^ng ?
:>> > Co' ma^'y models, low mid to hi.
:>> > Nhu+ng gia' ca? thi` ba'n nu+?a gia' ho.a may nhie^`u ngu+o+`i
:>> > mua :-)))
:>> >
:>> > http://dune-hd.com/hd_player...
:>> >
:>>
:>> U?a gia' bao nhie^u kho^ng tha^'y no'i ?
:>>
:>> ne^'u chu+`ng 5 nga`n ba.c thi` tui mua chu.c ca'i cho cha(?
:>> n :-)))))))))))
:>
:>Tha^'y ghe~ qua' ro^`i bi. shock ca` la(m post to+'i 2 la^`n lu+.ng ha~ -:)
:>
:>Theo tui thi` ddu+`ng ne^n cho+i ma^'y tha(`ng exotic la. qua('c, cho+i
:>ddo^` hie^.u no' co`n co' forum dde^~ mi`nh mo` dzo^ get tips & mod
:>firmware nu+~a cho+' ...
:>
:>Ca'i FreeAgent cu~a tui play ddu+o+.c Blu-ray cho+' sao hong, chi~ play
:>hong ddu+o+.c menu tho^i co`n phinh thi` ok -:)
:>
:>Omega


I love it !
I love it !
I love it !

-:)))))))))))

Just get my MediaPlayer today, installed and after 5 minutes I can
watch movies, listen to music, view photos on my Home Network and ext.
harddrive, I can watch YouTube, Picasa, Flickr etc on the net too.

Tomorrow I will convert all my DVDs to mp4 AVC and store them on my
ext. HD, goodbye DVD-Player -:)))

I love it !
I love it !
I love it !

And all that for 60 bucks -:))))

Omega