well, calling it a tribute it's too much...
this evening I've tinkered a little with shoes and I came out with a nodebox
like app.
on the left you write shoes code and it can appear on the right.
useful to try the elements and their properties I thought..or maybe to teach
some shoes.
anyway, the code is sloppy and the UI... well, the UI at its status it's
like it doesn't exist ;)
just a quick hack be warned.
Emanuel
# Emanuel Carnevale 2008
# emanuel.carnevale at gmail.com
Shoes.app :title => "NodeBox tribute", :width => 800, :height => 500, :resizable => false do
sideMargin = 10
@leftSide = stack :width => 0.5, :margin => sideMargin do
box = edit_box :height => 400, :width => parent.width - parent.gutter
flow do
button "Evaluate in a new window" do
begin
eval("window do #{box.text} end")
rescue Exception => err
#need to handle stuff better here..
alert err
end
end
button "Append to the right" do
[EMAIL PROTECTED]
eval("@canvas.append do
#{box.text}
end
")
end
button "Clear" do
eval("@canvas.append do clear end")
end
button "Save as Shoes app.." do
filename = ask_save_file
f=File.new(filename, 'w')
f.puts "Shoes.app do
#{box.text}
end"
#f.puts box.text
f.close
end
end
end
@rightSide = stack :width => 0.5, :height => 1.0 do
border red, :strokewidth => 2
@canvas = flow do
end
end
[EMAIL PROTECTED]
end