On Jun 29, 2007, at 11:01 PM, Morton G. wrote:
Thanks, James. I’ll do that. Do you think it might be a good idea
to post just the code (without the support files) on the mailing
list? In addition to sending it to you, that is.
I think just providing a link to get the application is sufficient
this time around. It’s sort of a necessary evil for this topic, I
think.
James Edward G. II
On Jun 29, 2007, at 11:53 PM, James Edward G. II wrote:
On Jun 29, 2007, at 8:19 PM, Morton G. wrote:
I tried to submit my solution but the mailing list rejected it as
too big (216 KB). What do I do now? Anybody got a suggestion for a
work-around?
You may send it to me off-list. I will host it from the Ruby Q.
site.
Thanks, James. I’ll do that. Do you think it might be a good idea to
post just the code (without the support files) on the mailing list?
In addition to sending it to you, that is.
Regards, Morton
Well, I sorta made a solution too, the code is not very nice as it
needs cleaning up but I didn’t have the time to do that…
But what the heck, I liked what came out and it was nice to use
curses once again, so I’ll share it anyway.
The thing needs a yaml file with names, but it would be easy to
refactor it for another data source.
The mail contains three files:
- quiz#129_2.rb (as it is a second try)
- ascii_letters5_5.txt (the characters you can use in the yaml file
(A-Z, 0-9, ‘.’, ‘,’ ))
- names.yml (example data file)
the yaml file needs records containing the name and the organisation,
if picked by the app, the app will add a picked-parameter to the hash.
To try it, please use a fairly large terminal window.
Regards
Ivo D.
On Jun 30, 2007, at 1:00 PM, James Edward G. II wrote:
You may send it to me off-list. I will host it from the Ruby
Quiz site.
Thanks, James. I’ll do that. Do you think it might be a good idea
to post just the code (without the support files) on the mailing
list? In addition to sending it to you, that is.
I think just providing a link to get the application is sufficient
this time around. It’s sort of a necessary evil for this topic, I
think.
James has very kindly hosted my solution at:
http://rubyquiz.com/hosted_solutions/129/morton/Quiz%20129.zip
My solution is implemented with a GUI built with Ruby/Tk and is a
project with several files scattered over several sub-directories.
The zip file contains a README showing the setup. I am attaching a
PDF to this message showing what the GUI looks like. It shows the
name picker after it has picked a winner. I’m sure you’ll agree that
it has picked a real winner.
The application attempts to build a little suspense before announcing
a winner. While this is happening, it puts up teaser messages and
makes the stars along the bottom of the window march across the window.
Regards, Morton