[QUIZ] Object Browser (#8)

J

James Edward Gray II

I'm concerned about the state of GUI toolkits for Ruby when in comes to
installation requirements, particularly under Mac OS X.
Amen.

I recently went through the steps to get Tk working with Ruby under
Mac OS X.
It was fairly complicated. After all that work I found that GUIs I
had created under Windows didn't look very good on Mac OS X.

I agree. TK doesn't do it for me.
I then decided to try FOX. That required downloading the X11 software
from Apple. I installed that and then found that I didn't
automatically get the X11 library files that are needed in order to
build FOX. Maybe I'll get this figured out eventually.

Many Mac users won't even consider installing X and I can't say I blame
them. Who needs two Window managers running? And X is so un-Mac. To
me, if it's not native, it's not a realistic solution.
Do others think this is an issue?

I would LOVE to have a Swing-like library (more robust, with document
classes) in the Ruby Std Lib. I realize that's asking the world, but I
can't imagine we wouldn't see huge returns on the effort invested.

James Edward Gray II
 
D

David Ross

R. Mark Volkmann said:
I'm concerned about the state of GUI toolkits for Ruby when in comes to
installation requirements, particularly under Mac OS X. I'm think about the
case where we want to create a Ruby-based GUI application for non-developers to
use.

I recently went through the steps to get Tk working with Ruby under Mac OS X.
It was fairly complicated. After all that work I found that GUIs I had created
under Windows didn't look very good on Mac OS X. I then decided to try FOX.
That required downloading the X11 software from Apple. I installed that and
then found that I didn't automatically get the X11 library files that are
needed in order to build FOX. Maybe I'll get this figured out eventually.

The bottom line is that even if you take the time to write a great GUI app.
using Ruby, your audience of potential users will likely be quite small.
Installing Ruby is easy enough, but setting up a GUI toolkit is prohibitively
complex for a non-developer. Compare this to Java. Install the Java Runtime
Environment or use Java Web Start and Swing is available.

One answer is to create web apps instead. That's not appropriate for every
application though.

Do others think this is an issue?
Complete sense. What we need is an interface to make use of many toolkits
Ex. Swing. I've been using WideStudio, but the main complaint is from MacOS
users(it needs X11, and its not "pretty" like Cocoa). The main problem with
these toolkits like wxWidgets(aka wxWindows, changed because M.S. forced
them to change the name) are 1) lack of features, and 2) glitches between
operating systems.

What you say is not really an issue at all. On unicies you are required to
downloaded needed runtime libraries. This also includes MacOSX. Simply
download and install the needed libraries. If they are too difficult get a
computer specialist to install them for you. Libraries are the main
issue, if
they are not in the system, it can be problematic to the non-tech savy user.

David Ross
 
G

Glenn Parker

R. Mark Volkmann said:
One answer is to create web apps instead. That's not appropriate for every
application though.

Do others think this is an issue?

One word: wxRuby.

Nice looking apps that move gracefully between platforms. I've worked
with wxPython and it's very nice.
 
B

Brian Schröder

Since we're talking...

I want to avoid embarrassing myself in the summary again by claiming to
know your code better than you, so I'll embarrass myself in this thread
with all of Ruby Talk looking on. See the question in the comment
below:

def object_browser(classtree = ClassTreeNode.new(Kernel))
ObjectSpace.each_object do | x |
classnode = classtree # <- This line truly isn't needed, right???
x.class.ancestors.reverse[1..-1].inject(classtree){ | classnode,
klass | classnode.add_class(klass) }.add_object(x)
end
classtree
end

Tell me I'm right this time, even if you need to lie to me. It's good
for my ego.

I'd say with all your contributions your ego should be floating quite high ;)

Well, it seems that this line truly is a leftover from my experiments. I'm shure you will find lots of junk in the solution. The new solution should contain less junk, so please put a disclaimer about "experimental alpha junk" into the summary if you are talking about my first version.

Regards,

Brian
 
B

Brian Schröder

Since we're talking...

I want to avoid embarrassing myself in the summary again by claiming to
know your code better than you, so I'll embarrass myself in this thread
with all of Ruby Talk looking on. See the question in the comment
below:

def object_browser(classtree = ClassTreeNode.new(Kernel))
ObjectSpace.each_object do | x |
classnode = classtree # <- This line truly isn't needed, right???
x.class.ancestors.reverse[1..-1].inject(classtree){ | classnode,
klass | classnode.add_class(klass) }.add_object(x)
end
classtree
end

Tell me I'm right this time, even if you need to lie to me. It's good
for my ego.

I'd say with all your contributions your ego should be floating quite high ;)

Well, it seems that this line truly is a leftover from my experiments. I'm shure you will find lots of junk in the solution. The new solution should contain less junk, so please put a disclaimer about "experimental alpha junk" into the summary if you are talking about my first version.

After reading this again, I want to stress that I'm very happy if someone criticizes my code or points me to weaknesses. I'm doing this to learn, not to boost.

(It is always difficult to find the right tone in emails ;)

Regards,

Brian
 
D

Dave Burt

Brian Schröder said:
After reading this again [...]

(It is always difficult to find the right tone in emails ;)

post(<<-END) { assert { seriousness < 1.0 } }

Usenet and email are falling apart.
Instead of being the great leap forward in communication they were meant to
be,
our text-based forms of communication are causing rifts between us.
Face-to-face and on the phone, our vocal inflexions make it clear when we
are not being serious, when we are being sarcastic.

End ambiguity in written sarcasm.
Use the sarcasm hat "^"
^and be the envy of all your friends^

Support the sarcasm mark --
Shift+6 on a keyboard near you!

END
 
R

Robert McGovern

End ambiguity in written sarcasm.
Use the sarcasm hat "^"
^and be the envy of all your friends^

Support the sarcasm mark --
Shift+6 on a keyboard near you!

I do like the idea of the Dave, thanks.

Rob
 
A

Alexander Kellett

I'm concerned about the state of GUI toolkits for Ruby when in comes to
installation requirements, particularly under Mac OS X. I'm think
about the
case where we want to create a Ruby-based GUI application for
non-developers to use.

qtruby installs easily on mac os x and has no dependancy on
the x11 cruft. qt looks good on linux windows and mac os x.
only issue is licensing on windows. this is no problem with
mac or linux but trolltech have screwed up slightly wrt to
licensing and gpl'ed windows applications. if someone could
pressure^Wencourage them to sort out this then i'd be
interested in making a port for windows.

Alex
 
A

Alexander Kellett

I do like the idea of the Dave, thanks

ditto. this sort of stuff has caused argument after argument for me
these past weeks. yay for telephones. boo for people that won't answer
them and prefer electronics means

Alex
 
J

Jason Sweat

I do like the idea of the Dave, thanks.

Rob

As long as you not mean:
^I do like the idea^ Dave, ^thanks^.

;)

BTW- in my posts/emails ;) indicates: WARNING, do not take what was
just said too seriously
 
J

James Britt

Alexander said:
ditto. this sort of stuff has caused argument after argument for me
these past weeks. yay for telephones. boo for people that won't answer
them and prefer electronics means

Once upon a time, there was no telephone, nor Internet, nor any
electronic means of communication. People had prolonged, albeit
temporally displaced, exchanges using mere text.

I'm fairly certain they managed to convey mirth, anger, leg-pulling,
puzzlement, and assorted other mental states with general success, all
without the use of smileys or other forms of arbitrary text decoration
and punctuation hacks.

I suspect that the telephone has done more to degrade the quality of
writing than any electronic tool; people have become so accustomed to
relying on tone of voice to convey information that they write as if the
sound they hear in their head carries over to the written word.

If you are being sarcastic, and want people to know it, one clever trick
is to write, "I'm being sarcastic."



James
 
J

James Edward Gray II

After reading this again, I want to stress that I'm very happy if
someone criticizes my code or points me to weaknesses. I'm doing this
to learn, not to boost.

Ditto for me.

I don't pretend to be even in the top half of the smartest people on
this list. Just because I write a summary doesn't mean it's remotely
correct. When you notice my mistakes, point and laugh so we'll all
remember what not to do. I'm a big boy, I can take it.

Ruby Quiz is a community maintained project, not a James project. I've
always intended this. As of today, we're tied, four James quizzes to
four community quizzes. Tomorrow, you'll take the lead. That
excellent! Keep 'em coming.

James Edward Gray II
 
B

Bill Kelly

End ambiguity in written sarcasm.
Use the sarcasm hat "^"
^and be the envy of all your friends^

I think we could also use a ##dual octothorpe of facetiousness##.


;-P hehe



Happy Thanksgiving, where applicable !


Regards,

Bill
 
D

Dave Burt

"James Britt":
Once upon a time, there was no telephone, nor Internet, nor any electronic
means of communication. People had prolonged, albeit temporally
displaced, exchanges using mere text.

I'm fairly certain they managed to convey mirth, anger, leg-pulling,
puzzlement, and assorted other mental states with general success, all
without the use of smileys or other forms of arbitrary text decoration and
punctuation hacks.

They actually followed standards of communication known as natural language
grammars. This included things like capital letters and regular use of
punctuation. Fancy.
I suspect that the telephone has done more to degrade the quality of
writing than any electronic tool; people have become so accustomed to
relying on tone of voice to convey information that they write as if the
sound they hear in their head carries over to the written word.

Very good point.
If you are being sarcastic, and want people to know it, one clever trick
is to write, "I'm being sarcastic."

To me, this defeats the purpose. I really like the idea of this thing being
a little less explicit. But this almost certainly comes from the "sound they
hear in their head" you mention in your previous paragraph.

Cheers,
Dave
 
D

Dave Burt

Bill Kelly said:
I think we could also use a ##dual octothorpe of facetiousness##.

Awesome! This is definitely making its way into my writing next chance I
get.
Dual octothorpe!
 
B

Brian Schröder

Anyway. Comments?

Hello Jamis,

I'm polishing my solution, and I'm wondering why you are storing object id's instead of object references in the tree? I'd imagine that storing the object reference takes the same amount of space as storing the id. Is it maybe because objects can't be GCed while they are stored in the tree? On the other hand, wouldn't GCing break your program?

Regards,

Brian

PS: I uploaded a new, usable version of the object browser to the quiz homepage. If anybody gives it a try i'd be happy to hear of suggestions.
 
N

Nick

Did you try RubyCocoa (http://www.fobj.com/rubycocoa/w.en/) ? If OS X is
your desired platform, then really this is the toolkit you should be using.


This is assuming you want to install the ruby development environment on
the users machine so they can use your software. There are better ways
to do it. If you link the interpreter to your own "startup" binary, you
can wrap it in a bundle on Mac OS X, or have the start menu call it from
Windows. I've bundled apps on OS X and put the required libraries in
the Resources directory, and they start just like Mac OS X apps (and
install just as easily too). For Mac OS X, I'd say RubyCocoa is the best
GUI toolkit (It's available in Framework form for easy installation).
For Windows, you need to choose the toolkit that best matches your
needs. For Linux, the Ruby GTK bindings I think make the most sense. For
multi-platform apps, I think wxRuby works great on GTK, Windows, and OS X.

In the end, it's not up to the user to have the libraries necessary to
run your app. You need to use the libraries that make the most sense for
your audience, and you need to install them in the best location. This
requires getting a little dirty with the installers, the ruby
interpreter, and the system at hand. But if the user can't install your
app, then they probably won't run it.

Nick
 
R

R. Mark Volkmann

----- Original Message -----
From: "Nick" <[email protected]>
To: "ruby-talk ML" <[email protected]>
Sent: Sunday, November 28, 2004 11:31 PM
Subject: Re: Ruby GUIs and installation effort
Did you try RubyCocoa (http://www.fobj.com/rubycocoa/w.en/) ? If OS X is
your desired platform, then really this is the toolkit you should be
using.

OS X is just one of my desired platforms. I want to write the code using a
single GUI toolkit and be able to run it under at least Windows, OS X and
Linux. I'm undecided about whether using native widgets is important, but
I'm leaning that way.
This is assuming you want to install the ruby development environment on
the users machine so they can use your software. There are better ways to
do it. If you link the interpreter to your own "startup" binary, you can
wrap it in a bundle on Mac OS X, or have the start menu call it from
Windows. I've bundled apps on OS X and put the required libraries in the
Resources directory, and they start just like Mac OS X apps (and install
just as easily too). For Mac OS X, I'd say RubyCocoa is the best GUI
toolkit (It's available in Framework form for easy installation). For
Windows, you need to choose the toolkit that best matches your needs. For
Linux, the Ruby GTK bindings I think make the most sense. For
multi-platform apps, I think wxRuby works great on GTK, Windows, and OS X.

In the end, it's not up to the user to have the libraries necessary to run
your app. You need to use the libraries that make the most sense for your
audience, and you need to install them in the best location. This requires
getting a little dirty with the installers, the ruby interpreter, and the
system at hand. But if the user can't install your app, then they probably
won't run it.

I agree. It seems though that "getting a little dirty with the installers"
could be done once for all of us rather that repeated for every Ruby GUI
application that requires portability to Windows, OS X and Linux and desires
to be used by non-developers. Having a one-click installer for each platform
that installs everything needed for a portable GUI seems ideal.
 
C

Curt Hibbs

R. Mark Volkmann wrote:[mailto:[email protected]]
I agree. It seems though that "getting a little dirty with the
installers"
could be done once for all of us rather that repeated for every Ruby GUI
application that requires portability to Windows, OS X and Linux
and desires
to be used by non-developers. Having a one-click installer for
each platform
that installs everything needed for a portable GUI seems ideal.

We *are* working towards this goal. But the road to success is paved by
volunteers willing to help...

We've got a one-click installer for windows, Steve Steiner is inching his
way closer to a one-click installer for osx (as a framework). I still need
someone willing to create and maintain one-click installers for kde and
gnome.

Then rubygems and rpabase (with integrated support in the one-click
installers) will provide subsequent customization to the user's installation
(as well as ongoing updates).

The missing piece would be a cross-platform installer that can package up
ruby apps, related extensions, and platform-specific binaries into
easy-to-distribute, self-installing applications. Any volunteers here?

Curt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top