[fxruby-users] (no subject)
dave L
dglnz at yahoo.com
Wed Jan 28 03:55:28 EST 2009
okay now that i've got GUIb running time to play :)
Issue i now have is the 1st example in the online tutorial troubling version 2 where we separate code from the generated code of GUIb.
here is my source
require "inchesX"
Class inchesX
#events
def init
convertButton.connect(SEL_COMMAND){
cmLabel.text = (inchesField.text.to_f * 2.54).to_s}
end
#unit test
if __FILE__==$0
require "FX"
app=App.new
w=inchesX.new app
w.topwin.show(0)
app.create
app.run
end
and here is the error i get when run from teh terminal (using kate to code wit a terminal at the bottom so i don't have to flick between windows/programs.
dave at AMD3000:/spare/foxgui$ ruby ExtendInches.rb
ExtendInches.rb:2: undefined local variable or method `inchesX' for main:Object (NameError)
dave at AMD3000:/spare/foxgui$
I have just tried as an experiment adding inchesX:: in front of the Widget names (eg inchesX::cmLabel...)
but still no joy!!
have also tried adding a require fox16 above the require inchesX wit no joy.
pointers please.
dave.
Easy recipes for Christmas entertaining on Yahoo!Xtra Lifestyle- http://nz.lifestyle.yahoo.com/food-recipes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20090128/62510cf5/attachment.html>
More information about the fxruby-users
mailing list