hi,
i have been played with tcltk and currently i used the button-widget
like the following:
TkButton.new(root) do
text 'i am a button’
pack do
padx 400
pady 400
side right
end
command proc {
puts ‘klick’
}
end
my question is:
why didn’t work the ‘command proc’ with a do … end?
i’ve been try this:
TkButton.new(root) do
text 'i am a button’
pack do
padx 400
pady 400
side right
end
command proc do
puts 'klick’
end
end
and then i get this:
tk.rb:23:in proc': tried to create Proc object without a block (ArgumentError) from tk.rb:23 from tk.rb:16:in
new’
from tk.rb:16:in `new’
from tk.rb:16
why is ruby saying this?
i don’t like bracket and so i’am sooo unhappy about this snifff
gentoo
kernel 2.6.5
gcc 3.3.3
ruby 1.9.0
tk 8.4.6
bovi
<- i’am a german guy, so i didn’t write this language very well (-:
sorry for this