[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Gui programming example

Aquila

12/6/2004 6:17:00 PM

I'm absolutely new to ruby but I can program in a lot of other languages. To
get to know this language better I would like to animate a robot walking to
a maze, does anyone of you have pointers to examples on GUI programming
with ruby? I'll learn the rest ;-)

Thanks!
--
"May the source be with you"
8 Answers

R. Mark Volkmann

12/6/2004 6:25:00 PM

0

Sounds like you need something with the power of Tk's Canvas widget. I've
been playing with that lately and like it a lot. I'm not familiar with the
details of other GUI toolkits for Ruby. I'd like to hear if they have
something equivalent to Tk's Canvas widget.

If you decide to play with Tk Canvas, I can send you my code.

----- Original Message -----
From: "Aquila" <braempje@netscape.net>
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Monday, December 06, 2004 12:17 PM
Subject: Gui programming example


> I'm absolutely new to ruby but I can program in a lot of other languages.
> To
> get to know this language better I would like to animate a robot walking
> to
> a maze, does anyone of you have pointers to examples on GUI programming
> with ruby? I'll learn the rest ;-)




Steven Jenkins

12/6/2004 7:09:00 PM

0

R. Mark Volkmann wrote:
> Sounds like you need something with the power of Tk's Canvas widget.
> I've been playing with that lately and like it a lot. I'm not familiar
> with the details of other GUI toolkits for Ruby. I'd like to hear if
> they have something equivalent to Tk's Canvas widget.

Ruby-gnome2 supports the Gnome Canvas. I've used the Canvas in C, and
written a little Gnome/GTK+ code in Ruby, but haven't yet used the Ruby
API for Canvas. The ruby-gnome2 source tarball includes some nice
examples (http://ruby-gnome2.sourc...).

I've been dabbling a little with Glade (Gnome UI builder) and Ruby. It's
almost too easy once you get the hang of it.

Steve


Tom Copeland

12/6/2004 7:28:00 PM

0

On Mon, 2004-12-06 at 13:17, Aquila wrote:
> I'm absolutely new to ruby but I can program in a lot of other languages. To
> get to know this language better I would like to animate a robot walking to
> a maze, does anyone of you have pointers to examples on GUI programming
> with ruby? I'll learn the rest ;-)

Duane Johnson just posted a Ruby game (tadpoles) that uses SDL here:

http://tadpoles.ruby...

It's even got a level editor:

http://tinyurl...

Yours,

Tom



Richard Lyman

12/6/2004 7:37:00 PM

0

FOX/FXRuby has a 2d canvas (FXCanvas) and a 3d GL canvas
(FXGLCanvas/FXGLViewer).

You'll see some examples on:
http://www.f... under the left hand link 'Screenshots'.

-Rich


On Tue, 7 Dec 2004 04:09:07 +0900, Steven Jenkins
<steven.jenkins@ieee.org> wrote:
> R. Mark Volkmann wrote:
> > Sounds like you need something with the power of Tk's Canvas widget.
> > I've been playing with that lately and like it a lot. I'm not familiar
> > with the details of other GUI toolkits for Ruby. I'd like to hear if
> > they have something equivalent to Tk's Canvas widget.
>
> Ruby-gnome2 supports the Gnome Canvas. I've used the Canvas in C, and
> written a little Gnome/GTK+ code in Ruby, but haven't yet used the Ruby
> API for Canvas. The ruby-gnome2 source tarball includes some nice
> examples (http://ruby-gnome2.sourc...).
>
> I've been dabbling a little with Glade (Gnome UI builder) and Ruby. It's
> almost too easy once you get the hang of it.
>
> Steve
>
>


Brian Schröder

12/6/2004 8:06:00 PM

0

On Tue, 7 Dec 2004 03:17:34 +0900
Aquila <braempje@netscape.net> wrote:

> I'm absolutely new to ruby but I can program in a lot of other languages. To
> get to know this language better I would like to animate a robot walking to
> a maze, does anyone of you have pointers to examples on GUI programming
> with ruby? I'll learn the rest ;-)
>

A small example project I once used in a ruby course can be found at.

http://ruby.brian-schroede...

Its cut down to be as simple as possible. Maybe it can help you as a starter.

Regards,

Brian

--
Brian Schröder
http://www.brian-sch...



Phlip

12/6/2004 8:16:00 PM

0

Aquila wrote:

> I'm absolutely new to ruby but I can program in a lot of other languages.
To
> get to know this language better I would like to animate a robot walking
to
> a maze, does anyone of you have pointers to examples on GUI programming
> with ruby? I'll learn the rest ;-)

Such a maze would be totally simple to animate using the Tk Canvas.

Here's an example of Ruby driving this canvas:

http://www.rubygarden.org/ruby...

--
Phlip
http://industrialxp.org/community/bin/view/Main/TestFirstUser...


Nick

12/8/2004 8:00:00 PM

0

Aquila wrote:
> I'm absolutely new to ruby but I can program in a lot of other languages. To
> get to know this language better I would like to animate a robot walking to
> a maze, does anyone of you have pointers to examples on GUI programming
> with ruby? I'll learn the rest ;-)

If you have any familiarity with the MFC, then wxRuby will seem very
familiar (without the bad stuff).

http://wxruby.rub...

Nick


Aquila

12/10/2004 10:45:00 AM

0

Brian Schröder wrote:

> A small example project I once used in a ruby course can be found at.
>
> http://ruby.brian-schroede...
>
> Its cut down to be as simple as possible. Maybe it can help you as a
> starter.

That's a very nice project, that helps quite a lot. Thanks, and thanks for
every other suggestion!
Now I do have a question: what is the "best" way to animate my robot walking
trough the maze? I probably should do some threading?
And one more thing: can I use existing images (png) as tiles for my maze?

I'm starting to like this language...
--
"May the source be with you"