On Mon, Sep 29, 2008 at 11:36 PM, recursor <[EMAIL PROTECTED]> wrote:
> 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?

I don't understand what you are trying to do. What is this app()
method on the stack supposed to do? Does it even work? I can't find it
in the manual doing a search. I see the class method Shoes.app() of
course, but..

Looking at your code, it seems like you just want to do something like

  @stack.append { ... }

in your add() method. Am I missing something?

-- 
Seth Thomas Rasmussen
http://greatseth.com

Reply via email to