TkOptionMenuButton

'tk.rb. contains a class named TkOptionMenuButton. Does anyone know of an
example using it? I neither instantiate it, nor derive from it. There
seems to be a /lot/ that I don’t understand yet!

Sigh
Alan Walkington

An example? How about:

require ‘tk’
win = TkRoot.new
omb = TkOptionMenubutton.new(win)
omb.pack
win.mainloop

Perfectly useless, but it works for me. I notice you wrote the class
name with a capital ‘B’ in your email. Did you do the same in your code?
If so, that would explain why it’s not working.

(BTW, I don’t know all this by heart … I’m not quite that
anal-retentive … just looked it up).

···

On Sun, Nov 03, 2002 at 02:58:09PM +0900, Alan (Ursus Major) wrote:

'tk.rb. contains a class named TkOptionMenuButton. Does anyone know of an
example using it? I neither instantiate it, nor derive from it. There
seems to be a /lot/ that I don’t understand yet!


Matt Gushee When a nation follows the Way,
Englewood, Colorado, USA Horses bear manure through
mgushee@havenrock.com its fields;
http://www.havenrock.com/ When a nation ignores the Way,
Horses bear soldiers through
its streets.

                        --Lao Tzu (Peter Merel, trans.)

'tk.rb. contains a class named TkOptionMenuButton. Does anyone know of an
example using it?

I assume you are asking what-is-it-good-for, rather than how-do-I-use-it.

I neither instantiate it, nor derive from it. There
seems to be a /lot/ that I don’t understand yet!

Search RAA for the Ruby/Tk demo. Much of the code is ugly but it will give
examples of both usage and code that will help after a little meditation.
I use the Perl/Tk Pocket Reference (almost cheap) , the Tcl/Tk Manual
(downloadable or online from the Tcl/Tk site.) and the Ruby/Tk code. There is
next to nothing by way of any documentation for Ruby/Tk itself. A shame.

···

On Saturday 02 November 2002 11:58 pm, Alan (Ursus Major) wrote:

Sigh
Alan Walkington


“I invented the term Object-Oriented, and I can
tell you I did not have C++ in mind.”
-Alan Kay

“Matt Gushee” mgushee@havenrock.com wrote in message
news:20021103061313.GF1190@swordfish…

Perfectly useless, but it works for me. I notice you wrote the class
name with a capital ‘B’ in your email. Did you do the same in your code?
If so, that would explain why it’s not working.

Sigh … yes, Matt, of course I did.

BTW, what do you use for your TK reference?

Thanks,
Alan

“Matt Gushee” mgushee@havenrock.com wrote in message

Perfectly useless, but it works for me. I notice you wrote the class
name with a capital ‘B’ in your email. Did you do the same in your code?
If so, that would explain why it’s not working.

Sigh … yes, Matt, of course I did.

Well, that’s an easy mistake to make. I’ve been caught by it more than
once.

BTW, what do you use for your TK reference?

Search RAA for the Ruby/Tk demo.

Which I happen to be maintaining, though not very actively.

Much of the code is ugly

Indeed. It’s basically just the Tcl/Tk demo package translated into
Ruby.

I use the Perl/Tk Pocket Reference (almost cheap) , the Tcl/Tk Manual
(downloadable or online from the Tcl/Tk site.) and the Ruby/Tk code. There is
next to nothing by way of any documentation for Ruby/Tk itself. A shame.

I also use the Tcl/Tk manual. Although it’s far from ideal, just about
everything you need to know is in there. In most cases, the names of
things are the same, and you just have to translate them into Ruby
syntax.

Writing some real Ruby/Tk documentation is on my to-do list, but that’s
a very long list, and its upper reaches are mostly populated by things I
might get paid for. I.e. this will probably not happen any time soon.

···

On Mon, Nov 04, 2002 at 03:58:43AM +0900, Alan (Ursus Major) wrote:
On Mon, Nov 04, 2002 at 04:56:18AM +0900, Albert Wagner wrote:


Matt Gushee When a nation follows the Way,
Englewood, Colorado, USA Horses bear manure through
mgushee@havenrock.com its fields;
http://www.havenrock.com/ When a nation ignores the Way,
Horses bear soldiers through
its streets.

                        --Lao Tzu (Peter Merel, trans.)

Matt Gushee wrote:

An example? How about:

require ‘tk’
win = TkRoot.new
omb = TkOptionMenubutton.new(win)
omb.pack
win.mainloop

That does its (perfectly useless) thing on Linux, but on Windows it
emits all this drama:

Q:\work\flea>ruby modness.rb
c:/ruby/lib/ruby/1.7/tk.rb:1030:in __invoke': unknown option "-kind_of" (RuntimeError) from c:/ruby/lib/ruby/1.7/tk.rb:1030:in _invoke’
from c:/ruby/lib/ruby/1.7/tk.rb:709:in tk_call' from c:/ruby/lib/ruby/1.7/tk.rb:2498:in configure’
from c:/ruby/lib/ruby/1.7/tk.rb:2447:in method_missing' from c:/ruby/lib/ruby/1.7/tk.rb:3615:in initialize’
from modness.rb:4:in `new’
from modness.rb:4

Not sure how such a small program could crash so big.

I run ruby173-6.exe from Pragmatic Programmers. Should I just get a
less bleeding-edge distro?

···


Phlip
I gotta have my orange juice. | Jesu, Juva
– How does Bugs Bunny do it? How does he know when he
wakes up in the morning to put in his pocket 3 sticks
of dynamite, a physician costume, and a bicycle pump? –

> > Search RAA for the Ruby/Tk demo. > > Which I happen to be maintaining, though not very actively. > > > Much of the code is ugly > > Indeed. It's basically just the Tcl/Tk demo package translated into > Ruby. > Oh, God. I am SO sorry. Really, I do apologize. Does Lao Tse also have something to say about an undisiplined tongue (or keyboard)? In fact the demo has been of more use to me than all of the documentation.
···

On Sunday 03 November 2002 2:30 pm, Matt Gushee wrote:


“I invented the term Object-Oriented, and I can
tell you I did not have C++ in mind.”
-Alan Kay

> > Search RAA for the Ruby/Tk demo. > > Which I happen to be maintaining, though not very actively. > > > Much of the code is ugly > > Indeed. It's basically just the Tcl/Tk demo package translated into > Ruby. > Oh, God. I am SO sorry. Really, I do apologize.

No need to apologize. I didn’t create the package, just inherited it.
Which may be just as well: if I had created it I might have tried to
make it much more elegant, and never gotten it done.

Does Lao Tse also have
something to say about an undisiplined tongue (or keyboard)?

Of course! Don’t you know the Tao Te Ching by definition covers
everything? Though sometimes the connection can be obscure … :wink:

In fact the
demo has been of more use to me than all of the documentation.

That’s good to hear, and I’ll keep it in mind when I get around to
making improvements.

···

On Mon, Nov 04, 2002 at 05:37:36AM +0900, Albert Wagner wrote:

On Sunday 03 November 2002 2:30 pm, Matt Gushee wrote:


Matt Gushee When a nation follows the Way,
Englewood, Colorado, USA Horses bear manure through
mgushee@havenrock.com its fields;
http://www.havenrock.com/ When a nation ignores the Way,
Horses bear soldiers through
its streets.

                        --Lao Tzu (Peter Merel, trans.)

Hi,

···

From: Matt Gushee mgushee@havenrock.com
Subject: Re: TkOptionMenuButton
Date: Mon, 4 Nov 2002 11:27:26 +0900
Message-ID: 20021104022710.GM1190@swordfish

No need to apologize. I didn’t create the package, just inherited it.
Which may be just as well: if I had created it I might have tried to
make it much more elegant, and never gotten it done.

I’m responsible for the ugly code.
When I wrote much of the Ruby/Tk widget demo,
there were few documents for Ruby/Tk.
But there were many documents for Tcl/Tk.
And I thought a large number of Ruby/Tk beginners have knew Tcl/Tk.
Therefore, the scripts were modeled on Tcl/Tk scripts,
because I believed that a comparison between Tcl/Tk and Ruby/Tk
helps to understand Ruby/Tk.

Some scripts which were written by other people are more elegant.
They made the scripts to get same effect of target Tcl/Tk scripts.

Maybe Ruby/Tk beginners of nowadays don’t know Tcl/Tk.
If it is so, we must try to add more elegant version of scripts.

Of course, I know the most important problem is a lack of documents.


Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Hi, Hidetoshi.

How are you doing? Is you eye better?
It is good to see you back.

···


“Every real thought on every real subject knocks the
wind out of somebody or other.”
-Oliver Wendell Holmes, Sr.

Hi,

···

From: Albert Wagner alwagner@tcac.net
Subject: Re: TkOptionMenuButton
Date: Thu, 7 Nov 2002 02:14:16 +0900
Message-ID: 200211060513.51835.alwagner@tcac.net

How are you doing? Is you eye better?
It is good to see you back.

Thank you, Albert.
My left eye looks stable. I can back slowly to normal life. :slight_smile:
Although some dusts are floating in my eye,
I must make them friends during my life time.
After I catch up in my work, I’m going to fix some of known bugs on Ruby/Tk.
And I want to work on some neglected topics (on Ruby and Ruby/Tk).

                              Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)