Gunther, 

Take a look at:

http://help.shoooes.net/Rules.html

The 'Shoes Tricky blocks' and 'Block Redirection' sections may help you.


----- Original Message ----
From: Gunther Diemant <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, September 29, 2008 8:57:22 AM
Subject: Question about App and window and Shoes url

Hello all,
i get a little confused. With this code

class Foo < Shoes
   url '/', :index

   def index
     para self.inspect  #1

     button 'Test' do
       window :title => 'window' do
         para self.inspect    #2
         para owner.inspect   #3
       end
     end
   end
end

Shoes.app :title => 'main'


i get:
#1 -> (Shoes::Foo)
After click on button:
#2 -> (Shoes::App "window")
#3 -> (Shoes::App "main")

My proplem is now, that I would expect that the owner of a window has  
the same class as the index page self.

I have a couple of methods which should be accseible from the main app  
and a pop up window. When I add the method to "Foo" I can call it from  
the main app, but not from the window (also owner.method does not  
work), if I add the methods to Shoes::App, I can call it from the  
window, but not from the main app.

Is this behavior intended or is this a bug?

Greetings
gunni


      

Reply via email to