Actually, I think you have to have "Mypara" in widget definition.

K

On Mon, Jul 27, 2009 at 1:28 AM, Krzysztof B. Wicher<[email protected]> wrote:
> Hi,
>
> I know it is only work around but seems to do what you want:
>
> class My_Para < Widget
>
>       def initialize(txt)
>               @text=txt
>       end
>       def show_text
>          para @text
>       end
> end
>
> Shoes.app do
>       mypara('432').show_text
>               @t=mypara('123')
>
>       button 'clickme' do
>         @t.show_text
>       end
> end
>
> regards
>
> Krzys
>
> On Mon, Jul 27, 2009 at 12:54 AM, Phillip Neumann<[email protected]> wrote:
>> Hi all.
>>
>> Im wondering how to make this work:
>>
>>
>> class MyPara < Widget
>>        def initialize(txt)
>>                para txt
>>        end
>> end
>>
>> Shoes.app do
>>        my_para '432'
>>        button 'clickme' do
>>                my_para '123'
>>        end
>> end
>>
>> Its failing for my_para '123'
>>
>>
>> Thanks!
>>
>

Reply via email to