Sorry about that, I was tired last night, and my brain wasn't working very well.

On Tue, Jul 14, 2009 at 5:23 AM, Ehsanul Hoque<[email protected]> wrote:
> Not useless at all, I hadn't realized you can call click on a slot. This
> seems to work in my test, even if scrolling beyond the app's end, so I'll
> have to try it in my actual app. Thanks :)
>
> And it isn't surprising you didn't think of it when you take into account
> the fact that you knew about calling click() on a slot directly. If I knew
> that, I wouldn't have thought of this either, wouldn't have had to. :)
>
>
>> Subject: Re: Problem detecting click inside slot
>> From: [email protected]
>> To: [email protected]
>> Date: Tue, 14 Jul 2009 00:47:34 -0700
>>
>> You know, I don't usually like to give useless replies like this, but here
>> goes:
>>
>> I can't believe I never thought of that. Seriously.
>>
>> Anyway:
>>
>> I think you can do this:
>>
>> Shoes.app do
>> @para = stack { para "HI" }
>> @para.click { @para.clear { para Time.now.to_s } }
>> end
>>
>>
>> That should work. If it doesn't it's a bug.
>>
>> On Mon, Jul 13, 2009 at 3:47 PM, Ehsanul Hoque<[email protected]>
>> wrote:
>> > To detect a click inside a slot, I've been using the following type of
>> > pattern, which mostly works fine:
>> >
>> > stack do
>> >   # Fill stack with stuff
>> >   hover { click { para "I actually do something more useful than just a
>> > para" } }
>> > end
>> >
>> > But the click isn't detected if the slot is below the end of the app
>> > window
>> > and you have to scroll down to see it. If it's visible without
>> > scrolling,
>> > then the click is detected fine. A shoes bug I guess, both raisins and
>> > policeman. Test the bug with following code:
>> >
>> > Shoes.app do
>> >   def create
>> >     flow( :height => 100, :width => 1.0 ) do
>> >       border black
>> >       hover do |s|
>> >         click { s.append { para "Clicked!" } }
>> >       end
>> >     end
>> >   end
>> >   10.times { create }
>> > end
>> >
>> > First thought the hover isn't working, but replacing the above hover
>> > call
>> > with the following shows it's not the case:
>> > hover { |s| s.append { para "Hovered!" } }
>> >
>> > Any solutions/workarounds? I wouldn't mind another way to catch clicks
>> > inside a slot.
>> >
>> > - Ehsan
>> >
>> > ________________________________
>> > Windows Live™ Hotmail®: Spread the word when you add celeb photos to
>> > your
>> > e-mails. Check it out.
>>
>>
>>
>> --
>> ~devyn
>
> ________________________________
> Windows Live™: Keep your life in sync. Check it out.



-- 
    ~devyn

Reply via email to