Finally found an explanation for the weird behavior of variables in Shoes. There is a fork of Shoes called Green Shoes that combines Ruby with Ruby-GTK to redo-shoes. Actually a neat idea since it extends Shoes to a larger windowing system. In the manual for the project I found something interesting about Shoes.
In Shoes each window is the unit. The stack blocks are weird. They look like normal blocks but are sub-set block of the window unit. The command para (for paragraph) which displays the text on a block is really self.para and self is from the Shoe's window. Additionally all instance variables inside and outside stack blocks, are held inside the window unit too. This is key and not well explained in the documentation on Red Shoes.
Still haven't figured out how to make my temperature conversion GUI program and I'm seriously tempted to just learn Xcode and code it on the Mac with Macruby, but Shoes with all it's faults is cross platform and that has huge advantages. And Xcode is not as easy to learn.
One good thing about Green Shoes is that it seems to be under active development where Shoes only has one developer (Steve) as far as I can tell and he's in grad school now. And Green Shoes being based on GTK it is likely to be far stabler than normal Red Shoes which crashes and drives up processing threads on my Mac fairly often.
In Shoes each window is the unit. The stack blocks are weird. They look like normal blocks but are sub-set block of the window unit. The command para (for paragraph) which displays the text on a block is really self.para and self is from the Shoe's window. Additionally all instance variables inside and outside stack blocks, are held inside the window unit too. This is key and not well explained in the documentation on Red Shoes.
Still haven't figured out how to make my temperature conversion GUI program and I'm seriously tempted to just learn Xcode and code it on the Mac with Macruby, but Shoes with all it's faults is cross platform and that has huge advantages. And Xcode is not as easy to learn.
One good thing about Green Shoes is that it seems to be under active development where Shoes only has one developer (Steve) as far as I can tell and he's in grad school now. And Green Shoes being based on GTK it is likely to be far stabler than normal Red Shoes which crashes and drives up processing threads on my Mac fairly often.
Comments
Post a Comment