Question about GUI API for Ruby

that's where i'm at with ruby/gtk. i've been on the ruby-gnome mailing
list for a few weeks , but i must have missed that post...

···

Wilson Bilkovich wrote on 1/13/2006 2:00 PM:

Some guy recently posted to ruby-gnome2 about a .zip file that he made
that contained a ruby + gnome2 executable that you could run without

Do you have a link to the mailing list posting? I've been struggling
with Rubyscript2EXE, attempting to deploy a Ruby/GTK application I
wrote. I'm having a lot of trouble bundling non-ruby/dll resources,

--
http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org

Very nice. Why can't this be used on initialization if tile is available? Also
have a method to deactivate the feature. I'm arguing because it should be
what users would want. People want pretty by default. Theres no harm in doing
so, and I believe most people would be using the line thinking it should be
default if tile is installed.

Tsume

···

On Sunday 15 January 2006 02:33 am, Hidetoshi NAGAI wrote:

Additional Information.:wink:
On ruby-1.8.4, "Tk::Tile.__Import_Tile_Widgets__!" method was added.
After calling the method, some widget classes denote classes on Tile
(e.g. TkButton.new generates a Tk::Tile::Button widget).

Well, heres a good question. How can one load a different style. I see a
method declared Tile.style, but I can't seem to load Clam style
Tk::Tile.style('Clam')

Tsume

···

On Sunday 15 January 2006 02:33 am, Hidetoshi NAGAI wrote:

From: tsumeruby@tsumelabs.com
Subject: Re: Question about GUI API for Ruby
Date: Sat, 14 Jan 2006 01:09:07 +0900
Message-ID: <200601140109.39164.tsumeruby@tsumelabs.com>

> If you don't like the feel of tk but are addicted to the toolkit, I
> recommend you look in to the Tk::Tile extension.

Additional Information.:wink:
On ruby-1.8.4, "Tk::Tile.__Import_Tile_Widgets__!" method was added.
After calling the method, some widget classes denote classes on Tile
(e.g. TkButton.new generates a Tk::Tile::Button widget).

tried that, and the dll's are included, but there's still something
missing. i'm thinking it's a gtk directory structure problem, and that
environment variables will need to be set when the rubyscript2exe exe
is run...

i've worked at it for awhile but no luck yet...

···

Jamey Cribbs wrote on 1/13/2006 3:12 PM:

Are you putting the non-ruby files in the application directory and
using tar2rubyapp (or whatever it's called) in conjunction with
rubyscript2exe?

conjunction with tar2rubyscript, it will include these files in the exe.

--
http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org

Message-ID: <200601150626.56305.tsumeruby@tsumelabs.com>

Very nice. Why can't this be used on initialization if tile is available?
Also have a method to deactivate the feature.

If called the method, the feature cannot be deactivated.
The method replaces some commands on *TK INTERPRETER*.
So, some mega-widgets may be able to benefit by Tile extension.
But, it is very risky because Tile widgets are NOT full compatible
to standard widgets.
It means that the method may make some other mega-widgets not work.

In the near future when Tile extension will be one of the standard
library of Tcl/Tk8.5, the risk may not exist or the feature may
be able to be deactivated.
Before that, the dangerous method cannot be called by default.

···

From: tsumeruby@tsumelabs.com
Subject: Re: Question about GUI API for Ruby
Date: Sun, 15 Jan 2006 06:26:20 +0900
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Message-ID: <200601150849.26920.tsumeruby@tsumelabs.com>

Well, heres a good question. How can one load a different style. I see a
method declared Tile.style, but I can't seem to load Clam style
Tk::Tile.style('Clam')

On my environment,

···

From: tsumeruby@tsumelabs.com
Subject: Re: Question about GUI API for Ruby
Date: Sun, 15 Jan 2006 08:48:44 +0900
-----------------------------------------------------
$ /usr/local/bin/irb
irb(main):001:0> require 'tkextlib/tile'
=> true
irb(main):002:0> Tk::Tile::Style.theme_names
=> ["step", "clam", "alt", "default", "classic"]
irb(main):003:0> Tk::Tile::Style.theme_use('clam')
=> ""
irb(main):004:0> Tk::Tile.style('clam')
=> "clam"
-----------------------------------------------------
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Thanks for this reply. I think it points out something fundamental in
my (lack of) understanding of RubyScript2EXE. I've been using the
rscript2exe.rb file directly to package the app. Should I be breaking
it into multiple steps in some way? The examples on the Rubyscript
page show it being run directly, and from what I saw, they mention
tar2rubyscript only in the form of a dependency, not as something I
should be using myself.

By 'application directory', do you mean the same directory as the main
whatever_my_app_is.rb file that handles the creation of the Gtk
windows, etc?

···

On 1/13/06, Jamey Cribbs <cribbsj@oakwood.org> wrote:

On Sat, 14 Jan 2006 04:00:36 +0900 > Wilson Bilkovich <wilsonb@gmail.com> wrote:

> Do you have a link to the mailing list posting? I've been struggling
> with Rubyscript2EXE, attempting to deploy a Ruby/GTK application I
> wrote. I'm having a lot of trouble bundling non-ruby/dll resources,
> such as YAML files and glade configs. I'm just about ready to write
> an NSIS installer instead.

Are you putting the non-ruby files in the application directory and
using tar2rubyapp (or whatever it's called) in conjunction with
rubyscript2exe?

I've used rubyscript2exe a lot to deploy both FXRuby apps and Ruby-Gtk2
apps and, if I remember correctly, if you place the non-ruby files like
dlls and image files in the application directory that you use in
conjunction with tar2rubyscript, it will include these files in the exe.

HTH,

Jamey Cribbs

If called the method, the feature cannot be deactivated.
The method replaces some commands on *TK INTERPRETER*.
So, some mega-widgets may be able to benefit by Tile extension.
But, it is very risky because Tile widgets are NOT full compatible
to standard widgets.
It means that the method may make some other mega-widgets not work.

I found how to activate different themes, and notice the errors. Hopefully
there will be work to make them compatible. Having tile as the default
rendering would be nice to have when programming with Tk.

In the near future when Tile extension will be one of the standard
library of Tcl/Tk8.5, the risk may not exist or the feature may
be able to be deactivated.
Before that, the dangerous method cannot be called by default.

I can imagine when they are integrated the compatibility will be 100%.

Tsume

···

On Sunday 15 January 2006 09:40 am, Hidetoshi NAGAI wrote:

Here is a quick example. It doesn't contain any C library, but it behaves the same way:

[gus@hibernatus Perso]$ ls -lR hellotheworld
hellotheworld:
total 4
-rwxrw-r-- 1 gus gus 70 Jan 16 08:07 init.rb*
drwxrwxr-x 2 gus gus 80 Jan 16 08:07 lib/

hellotheworld/lib:
total 4
-rw-rw-r-- 1 gus gus 66 Jan 16 08:06 hellotheworld.rb
[gus@hibernatus Perso]$ cat hellotheworld/lib/hellotheworld.rb
class Hello
   def say_hello
     puts "Hello the world!"
   end
end
[gus@hibernatus Perso]$ cat hellotheworld/init.rb
#!/usr/bin/env ruby

require 'lib/hellotheworld'

Hello.new.say_hello

The name init.rb is important. That is what tar2rubyscript will launch. Let pack it:

[gus@hibernatus Perso]$ tar2rubyscript.rb hellotheworld/
Creating archive...
Creating hellotheworld.rb ...
[gus@hibernatus Perso]$ ruby ./hellotheworld.rb
Hello the world!

Good, we have an autonomous script. Let add ruby to it:

[gus@hibernatus Perso]$ rubyscript2exe.rb hellotheworld.rb
Tracing hellotheworld ...
Hello the world!
Gathering files...
Copying files...
Stripping...
Creating hellotheworld_linux ...
[gus@hibernatus Perso]$ ./hellotheworld_linux
Hello the world!

Hope this helps,
Guillaume.

···

Le 15 janv. 06, à 18:50, Wilson Bilkovich a écrit :

On 1/13/06, Jamey Cribbs <cribbsj@oakwood.org> wrote:

On Sat, 14 Jan 2006 04:00:36 +0900 >> Wilson Bilkovich <wilsonb@gmail.com> wrote:

Do you have a link to the mailing list posting? I've been struggling
with Rubyscript2EXE, attempting to deploy a Ruby/GTK application I
wrote. I'm having a lot of trouble bundling non-ruby/dll resources,
such as YAML files and glade configs. I'm just about ready to write
an NSIS installer instead.

Are you putting the non-ruby files in the application directory and
using tar2rubyapp (or whatever it's called) in conjunction with
rubyscript2exe?

I've used rubyscript2exe a lot to deploy both FXRuby apps and Ruby-Gtk2
apps and, if I remember correctly, if you place the non-ruby files like
dlls and image files in the application directory that you use in
conjunction with tar2rubyscript, it will include these files in the exe.

HTH,

Jamey Cribbs

Thanks for this reply. I think it points out something fundamental in
my (lack of) understanding of RubyScript2EXE. I've been using the
rscript2exe.rb file directly to package the app. Should I be breaking
it into multiple steps in some way? The examples on the Rubyscript
page show it being run directly, and from what I saw, they mention
tar2rubyscript only in the form of a dependency, not as something I
should be using myself.

By 'application directory', do you mean the same directory as the main
whatever_my_app_is.rb file that handles the creation of the Gtk
windows, etc?