librelist archives

« back to archive

Help with debugging "hover"

Help with debugging "hover"

From:
Gosu Coder
Date:
2014-04-10 @ 16:06
Hey guys,
Can you help me debug this app:
# To do:
#    1. Debug this program
#

Shoes.app  :width => 500, :height => 700 do
    # This program catches mouse hovering over a stack
    stack :width => "50%", :height => "100%" do
        background gainsboro
        hover do
            background black
        end

        leave do
            background white
        end

    end     #stack

    stack :width => "50%", :height => "100%" do
        background black
        hover do
            background white
        end

        leave do
            background black
        end

    end #stack

end #Shoes.app

I'm trying to get the stacks to change color as they are given "attention"
(ie: the mouse hovers over them) but I can't seem to get it working.

Does the "hover" method not work for individual stacks? In the manual it
says hover works for "slots", so I assumed it would work for stacks.

Re: [shoes] Help with debugging "hover"

From:
Kc Erb
Date:
2014-04-10 @ 16:20
Hi there,

You are not ignored! Thanks for the nudge!

In Shoes3 it seems to be completely unresponsive to background being called
on hover. You can call just about any other function (try alert) and it
will work. But background isn't working. That could be expected behavior
but I doubt it.

In Shoes4 it seems to paint over both stacks, but we are aware of some
background issues (#617 <https://github.com/shoes/shoes4/issues/617>
,#618<https://github.com/shoes/shoes4/issues/618>)
and working on them.

In other words this seems broken (to me) in both cases.

On the other hand. I built an app sometime ago that needed basic background
color changes on hover and looking back, I used *clear* since I was
changing more than just the background.

So here's an example of your code that works in Shoes3, but not Shoes4 :(

https://gist.github.com/KCErb/10398761

Good luck and
Shoes on!

-KC


On Thu, Apr 10, 2014 at 10:06 AM, Gosu Coder <codergosu@gmail.com> wrote:

> Hey guys,
> Can you help me debug this app:
> # To do:
> #    1. Debug this program
> #
>
> Shoes.app  :width => 500, :height => 700 do
>     # This program catches mouse hovering over a stack
>     stack :width => "50%", :height => "100%" do
>         background gainsboro
>         hover do
>             background black
>         end
>
>         leave do
>             background white
>         end
>
>     end     #stack
>
>     stack :width => "50%", :height => "100%" do
>         background black
>         hover do
>             background white
>         end
>
>         leave do
>             background black
>         end
>
>     end #stack
>
> end #Shoes.app
>
> I'm trying to get the stacks to change color as they are given
> "attention" (ie: the mouse hovers over them) but I can't seem to get it
> working.
>
> Does the "hover" method not work for individual stacks? In the manual it
> says hover works for "slots", so I assumed it would work for stacks.
>
>
>


-- 
 "If there is an exception to every rule, then every rule must have at
least one exception; the exception to this one being that it has no
exception."

Re: [shoes] Help with debugging "hover"

From:
peter marien
Date:
2014-04-10 @ 21:53
Hi, and this works on green shoes

require 'green_shoes'

Shoes.app  :width => 500, :height => 700 do
   s = stack width: 250, height: "100%" do
     background gainsboro
   end
   s.hover do
     s.clear { background white }
   end
   s.leave do
     s.clear { background gainsboro }
   end

   s2 = stack width: 250, height: "100%" do
     background white
   end
   s2.hover do
     s2.clear { background white }
   end
   s2.leave do
     s2.clear { background gainsboro }
   end
 end

Shoes on!


2014-04-10 18:20 GMT+02:00 KC Erb <iamkcerb@gmail.com>:

> Hi there,
>
> You are not ignored! Thanks for the nudge!
>
> In Shoes3 it seems to be completely unresponsive to background being
> called on hover. You can call just about any other function (try alert) and
> it will work. But background isn't working. That could be expected behavior
> but I doubt it.
>
> In Shoes4 it seems to paint over both stacks, but we are aware of some
> background issues (#617 <https://github.com/shoes/shoes4/issues/617> 
,#618<https://github.com/shoes/shoes4/issues/618>)
> and working on them.
>
> In other words this seems broken (to me) in both cases.
>
> On the other hand. I built an app sometime ago that needed basic
> background color changes on hover and looking back, I used *clear* since
> I was changing more than just the background.
>
> So here's an example of your code that works in Shoes3, but not Shoes4 :(
>
> https://gist.github.com/KCErb/10398761
>
> Good luck and
> Shoes on!
>
> -KC
>
>
> On Thu, Apr 10, 2014 at 10:06 AM, Gosu Coder <codergosu@gmail.com> wrote:
>
>> Hey guys,
>> Can you help me debug this app:
>> # To do:
>> #    1. Debug this program
>> #
>>
>> Shoes.app  :width => 500, :height => 700 do
>>     # This program catches mouse hovering over a stack
>>     stack :width => "50%", :height => "100%" do
>>         background gainsboro
>>         hover do
>>             background black
>>         end
>>
>>         leave do
>>             background white
>>         end
>>
>>     end     #stack
>>
>>     stack :width => "50%", :height => "100%" do
>>         background black
>>         hover do
>>             background white
>>         end
>>
>>         leave do
>>             background black
>>         end
>>
>>     end #stack
>>
>> end #Shoes.app
>>
>> I'm trying to get the stacks to change color as they are given
>> "attention" (ie: the mouse hovers over them) but I can't seem to get it
>> working.
>>
>> Does the "hover" method not work for individual stacks? In the manual it
>> says hover works for "slots", so I assumed it would work for stacks.
>>
>>
>>
>
>
> --
>  "If there is an exception to every rule, then every rule must have at
> least one exception; the exception to this one being that it has no
> exception."
>



-- 
NSA Al-Qaeda Snowden Wikileaks Obama Bomb

Re: [shoes] Help with debugging "hover"

From:
Gosu Coder
Date:
2014-04-11 @ 00:35
Thanks guys.


On Thu, Apr 10, 2014 at 5:53 PM, peter marien <daddie88@gmail.com> wrote:

> Hi, and this works on green shoes
>
> require 'green_shoes'
>
> Shoes.app  :width => 500, :height => 700 do
>    s = stack width: 250, height: "100%" do
>      background gainsboro
>    end
>    s.hover do
>      s.clear { background white }
>    end
>    s.leave do
>      s.clear { background gainsboro }
>    end
>
>    s2 = stack width: 250, height: "100%" do
>      background white
>    end
>    s2.hover do
>      s2.clear { background white }
>    end
>    s2.leave do
>      s2.clear { background gainsboro }
>    end
>  end
>
> Shoes on!
>
>
> 2014-04-10 18:20 GMT+02:00 KC Erb <iamkcerb@gmail.com>:
>
> Hi there,
>>
>> You are not ignored! Thanks for the nudge!
>>
>> In Shoes3 it seems to be completely unresponsive to background being
>> called on hover. You can call just about any other function (try alert) and
>> it will work. But background isn't working. That could be expected behavior
>> but I doubt it.
>>
>> In Shoes4 it seems to paint over both stacks, but we are aware of some
>> background issues (#617 <https://github.com/shoes/shoes4/issues/617> ,
>> #618 <https://github.com/shoes/shoes4/issues/618>) and working on them.
>>
>> In other words this seems broken (to me) in both cases.
>>
>> On the other hand. I built an app sometime ago that needed basic
>> background color changes on hover and looking back, I used *clear* since
>> I was changing more than just the background.
>>
>> So here's an example of your code that works in Shoes3, but not Shoes4 :(
>>
>> https://gist.github.com/KCErb/10398761
>>
>> Good luck and
>> Shoes on!
>>
>> -KC
>>
>>
>> On Thu, Apr 10, 2014 at 10:06 AM, Gosu Coder <codergosu@gmail.com> wrote:
>>
>>> Hey guys,
>>> Can you help me debug this app:
>>> # To do:
>>> #    1. Debug this program
>>> #
>>>
>>> Shoes.app  :width => 500, :height => 700 do
>>>     # This program catches mouse hovering over a stack
>>>     stack :width => "50%", :height => "100%" do
>>>         background gainsboro
>>>         hover do
>>>             background black
>>>         end
>>>
>>>         leave do
>>>             background white
>>>         end
>>>
>>>     end     #stack
>>>
>>>     stack :width => "50%", :height => "100%" do
>>>         background black
>>>         hover do
>>>             background white
>>>         end
>>>
>>>         leave do
>>>             background black
>>>         end
>>>
>>>     end #stack
>>>
>>> end #Shoes.app
>>>
>>> I'm trying to get the stacks to change color as they are given
>>> "attention" (ie: the mouse hovers over them) but I can't seem to get it
>>> working.
>>>
>>> Does the "hover" method not work for individual stacks? In the manual it
>>> says hover works for "slots", so I assumed it would work for stacks.
>>>
>>>
>>>
>>
>>
>> --
>>  "If there is an exception to every rule, then every rule must have at
>> least one exception; the exception to this one being that it has no
>> exception."
>>
>
>
>
> --
> NSA Al-Qaeda Snowden Wikileaks Obama Bomb
>