I want to do some things with a class outside my app block, but I cannot get it
to work. I even went so far as
to copy the example given in http://help.shoooes.net/Rules.html under the
'Block Redirection' section and try
to use it:
class Messenger
def initialize(stack)
@stack = stack
end
def add(msg)
@stack.app do
@stack.append do
para msg
end
end
end
end
---snip-- (below is code that I added)
Shoes.app do
@msg = Messenger.new(stack)
button 'go' do
@msg.add "dy-no-mite"
end
end
The 'add' method should retrieve the app object from the stack object, but when
I do an alert @stack.app.inspect, I get:
(Shoes)
and the @stack.append does not work. Any thoughts?