Greg Ercolano wrote:
> I have to say pyfltk is some piece of work; compiled perfectly
> on my fedora3 box with no haggling, and the examples seem to work
> as advertised. Hell, there's even a table.py example that uses my
> Fl_Table widget.. works just like the original. And you can derive
> classes too.. I'm impressed!
Nothing to be impressed about.
These days with SWIG doing wrapping of any library onto any modern
scripting language is extremely easy.
You should try ruby-fltk or my own fltk2. Then you don't have to deal
with all the "self" crap of python, you can code with no parenthesis at
all, plus you get real closures and a language that is much easier to
transition from Perl (not to mention better than either). ruby-fltk
ships with all your widgets and fltk2 comes with all the your demos (in
addition to all fltk demos), plus a custom fluid that spits ruby code.
For example, this python example can be simplified using a closure to
just this (this is my own ruby fltk2):
#!/usr/bin/env ruby
require 'fltk2'
class MyButton < Fltk::Button
attr_accessor :secret
def initialize(x,y,w,h,label=nil)
super
@secret = 'ssss'
end
end
class MyWindow < Fltk::Window
def initialize(x,y,w,h,label=nil)
super
self.begin
MyButton.new(30,30,50,50) do |b,d|
b.label = 'okay'
puts b.secret
end
self.end
end
end
MyWindow.new(200,200,200,200).show
Fltk.run
-------------------
For ruby-fltk ( fltk1.0 ):
http://rubyforge.org/projects/fltk/
For ruby fltk2.0 (still not released, but fully functional):
svn co svn://rubyforge.org/var/svn/fltk/trunk rubyfltk2
--
Gonzalo Garramuño
[EMAIL PROTECTED]
AMD4400 - ASUS48N-E
GeForce7300GT
Kubuntu Edgy
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk