librelist archives

« back to archive

:click => proc

:click => proc

From:
Kc Erb
Date:
2013-07-11 @ 19:11
Hi all,

Based on the manual (http://shoesrb.com/manual/Styles.html) I expect that
the following should work:

 Shoes.app do

  alert_proc = Proc.new {alert "This Works!"}

  para "Click Me", stroke: blue, click: alert_proc

end

But I don't see it working in Shoes3 or 4. When I try to run it I get the
para with the correct stroke formatting but it doesn't respond to clicks.
No error message though.

What am I missing?


Thanks,
KC Erb


 "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] :click => proc

From:
Douglas Allen
Date:
2013-07-11 @ 19:25
What if you just call alert with click? Then try to pass the block if that
works.


On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com> wrote:

> Hi all,
>
> Based on the manual (http://shoesrb.com/manual/Styles.html) I expect that
> the following should work:
>
>  Shoes.app do
>
>   alert_proc = Proc.new {alert "This Works!"}
>
>   para "Click Me", stroke: blue, click: alert_proc
>
> end
>
> But I don't see it working in Shoes3 or 4. When I try to run it I get the
> para with the correct stroke formatting but it doesn't respond to clicks.
> No error message though.
>
> What am I missing?
>
>
> Thanks,
> KC Erb
>
>
>  "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] :click => proc

From:
Douglas Allen
Date:
2013-07-11 @ 19:30
I would suggest you try to find a good example. That always helps me if I
can see it work the play around with it.


On Thu, Jul 11, 2013 at 2:25 PM, Douglas Allen <kb9agt@gmail.com> wrote:

> What if you just call alert with click? Then try to pass the block if that
> works.
>
>
> On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com> wrote:
>
>> Hi all,
>>
>> Based on the manual (http://shoesrb.com/manual/Styles.html) I expect
>> that the following should work:
>>
>>  Shoes.app do
>>
>>   alert_proc = Proc.new {alert "This Works!"}
>>
>>   para "Click Me", stroke: blue, click: alert_proc
>>
>> end
>>
>> But I don't see it working in Shoes3 or 4. When I try to run it I get the
>> para with the correct stroke formatting but it doesn't respond to clicks.
>> No error message though.
>>
>> What am I missing?
>>
>>
>> Thanks,
>> KC Erb
>>
>>
>>  "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] :click => proc

From:
Douglas Allen
Date:
2013-07-11 @ 19:34
Shoes.app { button("Click me!") { alert("Good job.") } }

from http://shoesrb.com/manual/Hello.html



On Thu, Jul 11, 2013 at 2:30 PM, Douglas Allen <kb9agt@gmail.com> wrote:

> I would suggest you try to find a good example. That always helps me if I
> can see it work the play around with it.
>
>
> On Thu, Jul 11, 2013 at 2:25 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>
>> What if you just call alert with click? Then try to pass the block if
>> that works.
>>
>>
>> On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> Based on the manual (http://shoesrb.com/manual/Styles.html) I expect
>>> that the following should work:
>>>
>>>  Shoes.app do
>>>
>>>   alert_proc = Proc.new {alert "This Works!"}
>>>
>>>   para "Click Me", stroke: blue, click: alert_proc
>>>
>>> end
>>>
>>> But I don't see it working in Shoes3 or 4. When I try to run it I get
>>> the para with the correct stroke formatting but it doesn't respond to
>>> clicks. No error message though.
>>>
>>> What am I missing?
>>>
>>>
>>> Thanks,
>>> KC Erb
>>>
>>>
>>>  "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] :click => proc

From:
Kc Erb
Date:
2013-07-11 @ 19:43
Thanks Doug, Tobias nailed this one though, I'm not so much interested in
clicking on things in general as I am on clicking on a para and running a
proc.


On Thu, Jul 11, 2013 at 1:34 PM, Douglas Allen <kb9agt@gmail.com> wrote:

> Shoes.app { button("Click me!") { alert("Good job.") } }
>
> from http://shoesrb.com/manual/Hello.html
>
>
>
> On Thu, Jul 11, 2013 at 2:30 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>
>> I would suggest you try to find a good example. That always helps me if I
>> can see it work the play around with it.
>>
>>
>> On Thu, Jul 11, 2013 at 2:25 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>
>>> What if you just call alert with click? Then try to pass the block if
>>> that works.
>>>
>>>
>>> On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>
>>>> Hi all,
>>>>
>>>> Based on the manual (http://shoesrb.com/manual/Styles.html) I expect
>>>> that the following should work:
>>>>
>>>>  Shoes.app do
>>>>
>>>>   alert_proc = Proc.new {alert "This Works!"}
>>>>
>>>>   para "Click Me", stroke: blue, click: alert_proc
>>>>
>>>> end
>>>>
>>>> But I don't see it working in Shoes3 or 4. When I try to run it I get
>>>> the para with the correct stroke formatting but it doesn't respond to
>>>> clicks. No error message though.
>>>>
>>>> What am I missing?
>>>>
>>>>
>>>> Thanks,
>>>> KC Erb
>>>>
>>>>
>>>>  "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."
>>>>
>>>
>>>
>>
>


-- 
 "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] :click => proc

From:
Douglas Allen
Date:
2013-07-11 @ 20:20
Just fork it first. That makes a copy of it to your own repository.
Then be sure to have git installed or use http://windows.github.com/
then click the clone button. That will download it to your system for you
to work on.

Later you may learn about branches, pushing and pull requests.
And be sure to try out the codeschool quickstart for github. That is a
great one for just getting started with github.




On Thu, Jul 11, 2013 at 2:43 PM, KC Erb <iamkcerb@gmail.com> wrote:

> Thanks Doug, Tobias nailed this one though, I'm not so much interested in
> clicking on things in general as I am on clicking on a para and running a
> proc.
>
>
> On Thu, Jul 11, 2013 at 1:34 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>
>> Shoes.app { button("Click me!") { alert("Good job.") } }
>>
>> from http://shoesrb.com/manual/Hello.html
>>
>>
>>
>> On Thu, Jul 11, 2013 at 2:30 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>
>>> I would suggest you try to find a good example. That always helps me if
>>> I can see it work the play around with it.
>>>
>>>
>>> On Thu, Jul 11, 2013 at 2:25 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>>
>>>> What if you just call alert with click? Then try to pass the block if
>>>> that works.
>>>>
>>>>
>>>> On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> Based on the manual (http://shoesrb.com/manual/Styles.html) I expect
>>>>> that the following should work:
>>>>>
>>>>>  Shoes.app do
>>>>>
>>>>>   alert_proc = Proc.new {alert "This Works!"}
>>>>>
>>>>>   para "Click Me", stroke: blue, click: alert_proc
>>>>>
>>>>> end
>>>>>
>>>>> But I don't see it working in Shoes3 or 4. When I try to run it I get
>>>>> the para with the correct stroke formatting but it doesn't respond to
>>>>> clicks. No error message though.
>>>>>
>>>>> What am I missing?
>>>>>
>>>>>
>>>>> Thanks,
>>>>> KC Erb
>>>>>
>>>>>
>>>>>  "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."
>>>>>
>>>>
>>>>
>>>
>>
>
>
> --
>  "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] :click => proc

From:
Douglas Allen
Date:
2013-07-11 @ 20:22
http://try.github.io/levels/1/challenges/1


On Thu, Jul 11, 2013 at 3:20 PM, Douglas Allen <kb9agt@gmail.com> wrote:

> Just fork it first. That makes a copy of it to your own repository.
> Then be sure to have git installed or use http://windows.github.com/
> then click the clone button. That will download it to your system for you
> to work on.
>
> Later you may learn about branches, pushing and pull requests.
> And be sure to try out the codeschool quickstart for github. That is a
> great one for just getting started with github.
>
>
>
>
> On Thu, Jul 11, 2013 at 2:43 PM, KC Erb <iamkcerb@gmail.com> wrote:
>
>> Thanks Doug, Tobias nailed this one though, I'm not so much interested in
>> clicking on things in general as I am on clicking on a para and running a
>> proc.
>>
>>
>> On Thu, Jul 11, 2013 at 1:34 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>
>>> Shoes.app { button("Click me!") { alert("Good job.") } }
>>>
>>> from http://shoesrb.com/manual/Hello.html
>>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 2:30 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>>
>>>> I would suggest you try to find a good example. That always helps me if
>>>> I can see it work the play around with it.
>>>>
>>>>
>>>> On Thu, Jul 11, 2013 at 2:25 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>
>>>>> What if you just call alert with click? Then try to pass the block if
>>>>> that works.
>>>>>
>>>>>
>>>>> On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> Based on the manual (http://shoesrb.com/manual/Styles.html) I expect
>>>>>> that the following should work:
>>>>>>
>>>>>>  Shoes.app do
>>>>>>
>>>>>>   alert_proc = Proc.new {alert "This Works!"}
>>>>>>
>>>>>>   para "Click Me", stroke: blue, click: alert_proc
>>>>>>
>>>>>> end
>>>>>>
>>>>>> But I don't see it working in Shoes3 or 4. When I try to run it I get
>>>>>> the para with the correct stroke formatting but it doesn't respond to
>>>>>> clicks. No error message though.
>>>>>>
>>>>>> What am I missing?
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> KC Erb
>>>>>>
>>>>>>
>>>>>>  "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."
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>>
>> --
>>  "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] :click => proc

From:
Kc Erb
Date:
2013-07-11 @ 20:29
Oh wow! Thanks a lot Doug, I didn't realize github was so user friendly.
I'll get crackin' on this right away.


On Thu, Jul 11, 2013 at 2:22 PM, Douglas Allen <kb9agt@gmail.com> wrote:

> http://try.github.io/levels/1/challenges/1
>
>
> On Thu, Jul 11, 2013 at 3:20 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>
>> Just fork it first. That makes a copy of it to your own repository.
>> Then be sure to have git installed or use http://windows.github.com/
>> then click the clone button. That will download it to your system for you
>> to work on.
>>
>> Later you may learn about branches, pushing and pull requests.
>> And be sure to try out the codeschool quickstart for github. That is a
>> great one for just getting started with github.
>>
>>
>>
>>
>> On Thu, Jul 11, 2013 at 2:43 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>
>>> Thanks Doug, Tobias nailed this one though, I'm not so much interested
>>> in clicking on things in general as I am on clicking on a para and running
>>> a proc.
>>>
>>>
>>> On Thu, Jul 11, 2013 at 1:34 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>>
>>>> Shoes.app { button("Click me!") { alert("Good job.") } }
>>>>
>>>> from http://shoesrb.com/manual/Hello.html
>>>>
>>>>
>>>>
>>>> On Thu, Jul 11, 2013 at 2:30 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>
>>>>> I would suggest you try to find a good example. That always helps me
>>>>> if I can see it work the play around with it.
>>>>>
>>>>>
>>>>> On Thu, Jul 11, 2013 at 2:25 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>
>>>>>> What if you just call alert with click? Then try to pass the block if
>>>>>> that works.
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> Based on the manual (http://shoesrb.com/manual/Styles.html) I
>>>>>>> expect that the following should work:
>>>>>>>
>>>>>>>  Shoes.app do
>>>>>>>
>>>>>>>   alert_proc = Proc.new {alert "This Works!"}
>>>>>>>
>>>>>>>   para "Click Me", stroke: blue, click: alert_proc
>>>>>>>
>>>>>>> end
>>>>>>>
>>>>>>> But I don't see it working in Shoes3 or 4. When I try to run it I
>>>>>>> get the para with the correct stroke formatting but it doesn't respond to
>>>>>>> clicks. No error message though.
>>>>>>>
>>>>>>> What am I missing?
>>>>>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> KC Erb
>>>>>>>
>>>>>>>
>>>>>>>  "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."
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>>  "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."
>>>
>>
>>
>


-- 
 "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] :click => proc

From:
Tobias Pfeiffer
Date:
2013-07-11 @ 20:31
I see you found some help, great.

Generally the best way is to comment on issues at github or try to hang 
out in IRC freenode on #shoes although responses might take a while 
there :-)

On Thu 11 Jul 2013 10:29:41 PM CEST, KC Erb wrote:
> Oh wow! Thanks a lot Doug, I didn't realize github was so user
> friendly. I'll get crackin' on this right away.
>
>
> On Thu, Jul 11, 2013 at 2:22 PM, Douglas Allen <kb9agt@gmail.com
> <mailto:kb9agt@gmail.com>> wrote:
>
>     http://try.github.io/levels/1/challenges/1
>
>
>     On Thu, Jul 11, 2013 at 3:20 PM, Douglas Allen <kb9agt@gmail.com
>     <mailto:kb9agt@gmail.com>> wrote:
>
>         Just fork it first. That makes a copy of it to your own
>         repository.
>         Then be sure to have git installed or use
>         http://windows.github.com/
>         then click the clone button. That will download it to your
>         system for you to work on.
>
>         Later you may learn about branches, pushing and pull requests.
>         And be sure to try out the codeschool quickstart for github.
>         That is a great one for just getting started with github.
>
>
>
>
>         On Thu, Jul 11, 2013 at 2:43 PM, KC Erb <iamkcerb@gmail.com
>         <mailto:iamkcerb@gmail.com>> wrote:
>
>             Thanks Doug, Tobias nailed this one though, I'm not so
>             much interested in clicking on things in general as I am
>             on clicking on a para and running a proc.
>
>
>             On Thu, Jul 11, 2013 at 1:34 PM, Douglas Allen
>             <kb9agt@gmail.com <mailto:kb9agt@gmail.com>> wrote:
>
>                 |Shoes.app{  button("Click me!")  {  alert("Good job.")  }  }|
>
>                 |from|http://shoesrb.com/manual/Hello.html
>
>
>
>                 On Thu, Jul 11, 2013 at 2:30 PM, Douglas Allen
>                 <kb9agt@gmail.com <mailto:kb9agt@gmail.com>> wrote:
>
>                     I would suggest you try to find a good example.
>                     That always helps me if I can see it work the play
>                     around with it.
>
>
>                     On Thu, Jul 11, 2013 at 2:25 PM, Douglas Allen
>                     <kb9agt@gmail.com <mailto:kb9agt@gmail.com>> wrote:
>
>                         What if you just call alert with click? Then
>                         try to pass the block if that works.
>
>
>                         On Thu, Jul 11, 2013 at 2:11 PM, KC Erb
>                         <iamkcerb@gmail.com
>                         <mailto:iamkcerb@gmail.com>> wrote:
>
>                             Hi all,
>
>                             Based on the manual
>                             (http://shoesrb.com/manual/Styles.html) I
>                             expect that the following should work:
>
>                             Shoes.app do
>
>                               alert_proc = Proc.new {alert "This Works!"}
>
>                               para "Click Me", stroke: blue,
>                             click: alert_proc
>
>                             end
>
>                             But I don't see it working in Shoes3 or 4.
>                             When I try to run it I get the para with
>                             the correct stroke formatting but it
>                             doesn't respond to clicks. No error
>                             message though.
>
>                             What am I missing?
>
>
>                             Thanks,
>                             KC Erb
>
>
>                              "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."
>
>
>
>
>
>
>
>             --
>              "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."
>
>
>
>
>
>
> --
>  "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] :click => proc

From:
Douglas Allen
Date:
2013-07-11 @ 21:21
Then there is click anywhere.
Shoes.app do

  alert_proc = Proc.new {alert "This Works!"}
  para "Click anywhere", stroke: blue
  click do
     alert_proc.call
  end

end


On Thu, Jul 11, 2013 at 3:29 PM, KC Erb <iamkcerb@gmail.com> wrote:

> Oh wow! Thanks a lot Doug, I didn't realize github was so user friendly.
> I'll get crackin' on this right away.
>
>
> On Thu, Jul 11, 2013 at 2:22 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>
>> http://try.github.io/levels/1/challenges/1
>>
>>
>> On Thu, Jul 11, 2013 at 3:20 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>
>>> Just fork it first. That makes a copy of it to your own repository.
>>> Then be sure to have git installed or use http://windows.github.com/
>>> then click the clone button. That will download it to your system for
>>> you to work on.
>>>
>>> Later you may learn about branches, pushing and pull requests.
>>> And be sure to try out the codeschool quickstart for github. That is a
>>> great one for just getting started with github.
>>>
>>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 2:43 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>
>>>> Thanks Doug, Tobias nailed this one though, I'm not so much interested
>>>> in clicking on things in general as I am on clicking on a para and running
>>>> a proc.
>>>>
>>>>
>>>> On Thu, Jul 11, 2013 at 1:34 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>
>>>>> Shoes.app { button("Click me!") { alert("Good job.") } }
>>>>>
>>>>> from http://shoesrb.com/manual/Hello.html
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Jul 11, 2013 at 2:30 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>
>>>>>> I would suggest you try to find a good example. That always helps me
>>>>>> if I can see it work the play around with it.
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 11, 2013 at 2:25 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>
>>>>>>> What if you just call alert with click? Then try to pass the block
>>>>>>> if that works.
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> Based on the manual (http://shoesrb.com/manual/Styles.html) I
>>>>>>>> expect that the following should work:
>>>>>>>>
>>>>>>>>  Shoes.app do
>>>>>>>>
>>>>>>>>   alert_proc = Proc.new {alert "This Works!"}
>>>>>>>>
>>>>>>>>   para "Click Me", stroke: blue, click: alert_proc
>>>>>>>>
>>>>>>>> end
>>>>>>>>
>>>>>>>> But I don't see it working in Shoes3 or 4. When I try to run it I
>>>>>>>> get the para with the correct stroke formatting but it doesn't respond to
>>>>>>>> clicks. No error message though.
>>>>>>>>
>>>>>>>> What am I missing?
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> KC Erb
>>>>>>>>
>>>>>>>>
>>>>>>>>  "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."
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>  "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."
>>>>
>>>
>>>
>>
>
>
> --
>  "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] :click => proc

From:
Douglas Allen
Date:
2013-07-11 @ 21:34
Looking in the ,travis.yml for shoes 3 policeman there is "
irc.freenode.org#shoes"
Is that still active?


On Thu, Jul 11, 2013 at 4:21 PM, Douglas Allen <kb9agt@gmail.com> wrote:

> Then there is click anywhere.
> Shoes.app do
>
>   alert_proc = Proc.new {alert "This Works!"}
>   para "Click anywhere", stroke: blue
>   click do
>      alert_proc.call
>   end
>
> end
>
>
> On Thu, Jul 11, 2013 at 3:29 PM, KC Erb <iamkcerb@gmail.com> wrote:
>
>> Oh wow! Thanks a lot Doug, I didn't realize github was so user friendly.
>> I'll get crackin' on this right away.
>>
>>
>> On Thu, Jul 11, 2013 at 2:22 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>
>>> http://try.github.io/levels/1/challenges/1
>>>
>>>
>>> On Thu, Jul 11, 2013 at 3:20 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>>
>>>> Just fork it first. That makes a copy of it to your own repository.
>>>> Then be sure to have git installed or use http://windows.github.com/
>>>> then click the clone button. That will download it to your system for
>>>> you to work on.
>>>>
>>>> Later you may learn about branches, pushing and pull requests.
>>>> And be sure to try out the codeschool quickstart for github. That is a
>>>> great one for just getting started with github.
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Jul 11, 2013 at 2:43 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>>
>>>>> Thanks Doug, Tobias nailed this one though, I'm not so much interested
>>>>> in clicking on things in general as I am on clicking on a para and running
>>>>> a proc.
>>>>>
>>>>>
>>>>> On Thu, Jul 11, 2013 at 1:34 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>
>>>>>> Shoes.app { button("Click me!") { alert("Good job.") } }
>>>>>>
>>>>>> from http://shoesrb.com/manual/Hello.html
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 11, 2013 at 2:30 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>
>>>>>>> I would suggest you try to find a good example. That always helps me
>>>>>>> if I can see it work the play around with it.
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jul 11, 2013 at 2:25 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>>
>>>>>>>> What if you just call alert with click? Then try to pass the block
>>>>>>>> if that works.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> Based on the manual (http://shoesrb.com/manual/Styles.html) I
>>>>>>>>> expect that the following should work:
>>>>>>>>>
>>>>>>>>>  Shoes.app do
>>>>>>>>>
>>>>>>>>>   alert_proc = Proc.new {alert "This Works!"}
>>>>>>>>>
>>>>>>>>>   para "Click Me", stroke: blue, click: alert_proc
>>>>>>>>>
>>>>>>>>> end
>>>>>>>>>
>>>>>>>>> But I don't see it working in Shoes3 or 4. When I try to run it I
>>>>>>>>> get the para with the correct stroke formatting but it doesn't 
respond to
>>>>>>>>> clicks. No error message though.
>>>>>>>>>
>>>>>>>>> What am I missing?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> KC Erb
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>  "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."
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>  "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."
>>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>>  "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] :click => proc

From:
Tobias Pfeiffer
Date:
2013-07-11 @ 21:41
yeah that's what I'm talking about. It is active, lots of us hang out 
there but as it is the nature of IRC it can take to get back to you, I 
just check IRC in some pomodori breaks. If you really need me, make 
sure to mention me (PragTob).

On Thu 11 Jul 2013 11:34:33 PM CEST, Douglas Allen wrote:
> Looking in the ,travis.yml for shoes 3 policeman there
> is "irc.freenode.org#shoes <http://irc.freenode.org#shoes>"
> Is that still active?
>
>
> On Thu, Jul 11, 2013 at 4:21 PM, Douglas Allen <kb9agt@gmail.com
> <mailto:kb9agt@gmail.com>> wrote:
>
>     Then there is click anywhere.
>     Shoes.app do
>       alert_proc = Proc.new {alert "This Works!"}
>       para "Click anywhere", stroke: blue
>       click do
>          alert_proc.call
>       end
>
>     end
>
>
>     On Thu, Jul 11, 2013 at 3:29 PM, KC Erb <iamkcerb@gmail.com
>     <mailto:iamkcerb@gmail.com>> wrote:
>
>         Oh wow! Thanks a lot Doug, I didn't realize github was so user
>         friendly. I'll get crackin' on this right away.
>
>
>         On Thu, Jul 11, 2013 at 2:22 PM, Douglas Allen
>         <kb9agt@gmail.com <mailto:kb9agt@gmail.com>> wrote:
>
>             http://try.github.io/levels/1/challenges/1
>
>
>             On Thu, Jul 11, 2013 at 3:20 PM, Douglas Allen
>             <kb9agt@gmail.com <mailto:kb9agt@gmail.com>> wrote:
>
>                 Just fork it first. That makes a copy of it to your
>                 own repository.
>                 Then be sure to have git installed or use
>                 http://windows.github.com/
>                 then click the clone button. That will download it to
>                 your system for you to work on.
>
>                 Later you may learn about branches, pushing and pull
>                 requests.
>                 And be sure to try out the codeschool quickstart for
>                 github. That is a great one for just getting started
>                 with github.
>
>
>
>
>                 On Thu, Jul 11, 2013 at 2:43 PM, KC Erb
>                 <iamkcerb@gmail.com <mailto:iamkcerb@gmail.com>> wrote:
>
>                     Thanks Doug, Tobias nailed this one though, I'm
>                     not so much interested in clicking on things in
>                     general as I am on clicking on a para and running
>                     a proc.
>
>
>                     On Thu, Jul 11, 2013 at 1:34 PM, Douglas Allen
>                     <kb9agt@gmail.com <mailto:kb9agt@gmail.com>> wrote:
>
>                         |Shoes.app{  button("Click me!")  {  alert("Good
job.")  }  }|
>
>                         |from|http://shoesrb.com/manual/Hello.html
>
>
>
>                         On Thu, Jul 11, 2013 at 2:30 PM, Douglas Allen
>                         <kb9agt@gmail.com <mailto:kb9agt@gmail.com>>
>                         wrote:
>
>                             I would suggest you try to find a good
>                             example. That always helps me if I can see
>                             it work the play around with it.
>
>
>                             On Thu, Jul 11, 2013 at 2:25 PM, Douglas
>                             Allen <kb9agt@gmail.com
>                             <mailto:kb9agt@gmail.com>> wrote:
>
>                                 What if you just call alert with
>                                 click? Then try to pass the block if
>                                 that works.
>
>
>                                 On Thu, Jul 11, 2013 at 2:11 PM, KC
>                                 Erb <iamkcerb@gmail.com
>                                 <mailto:iamkcerb@gmail.com>> wrote:
>
>                                     Hi all,
>
>                                     Based on the manual
>                                     (http://shoesrb.com/manual/Styles.html)
>                                     I expect that the following should
>                                     work:
>
>                                     Shoes.app do
>
>                                       alert_proc = Proc.new {alert
>                                     "This Works!"}
>
>                                       para "Click Me", stroke: blue,
>                                     click: alert_proc
>
>                                     end
>
>                                     But I don't see it working in
>                                     Shoes3 or 4. When I try to run it
>                                     I get the para with the correct
>                                     stroke formatting but it doesn't
>                                     respond to clicks. No error
>                                     message though.
>
>                                     What am I missing?
>
>
>                                     Thanks,
>                                     KC Erb
>
>
>                                      "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."
>
>
>
>
>
>
>
>                     --
>                      "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."
>
>
>
>
>
>
>         --
>          "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] :click => proc

From:
Kc Erb
Date:
2013-07-11 @ 22:22
While I'm wading into github and figuring out why para (and others) isn't
clickable, it *would* be great to find a workaround.

What I'm *actually* trying to get out of click is a call to a method I call
drag_and_drop. The method takes x, and y, from click and some information
about the thing that got clicked on and then behaves appropriately from
there:

def drag_and_drop ( user_id, x, y)
  contents (not secret, just irrelevant)
end

So far it has worked great since everything I needed to drag and drop was a
stack with someone's name in it.

stack do
  para people_info[user_id].name
  click do |button, x, y|
    drag_and_drop(user_id, x, y)
  end
end

(people_info is a hash of "People" Structs indexed by user_id)

But now I have a stack with several names in it and I want drag and drop to
be able to see which name I clicked on. The nicest way to do that would be

flow do
  para people_info[user_id_arr[0]].name, click: {|button, x, y|
drag_and_drop(user_id_array[0], x ,y) }
  para people_info[user_id_arr[1]].name, . . .
  ...
end

It should look like this:

=========================
= Carl Adams & Cody Froo         =
=========================


But with :click not working the only thing I've come up with is:

flow do
  stack do
    para
    click
  end
  stack do
    para
    click
  end
  ...
end

This doesn't work though, because the stacks are stacking (instead of
flowing) since by default they each have a width of 100%. (Which produces
this:

=========================
= Carl Adams &                        =
= Cody Froo                             =
=========================

)

 I have to fix the widths of the stacks so that they sum up to 100% which
is tough since I don't know the width of a para until after it is drawn.

That's not the end though! I did try to have Shoes look at the size of the
stack after it was drawn and redraw it to fit the para snuggly and add up
to 100% after it was drawn:


    (I named each stack and para so that I could call them later, is there
a better way?)

      @s1.style( width: @p1.width)
      @s2.style( width: @p2.width)
      @s3.style( width: @p3.width)
      @s4.style( width: @p4.width)
      @s4.style( width: -(@p1.width + @p2.width + @p3.width + @p4.width))

But now the problem is that I'm drawing each of these flows (by flow I mean
the flow with all the para stacks in it) in a loop:

groups.each do

  flow do
    @s1 = stack do
      @p1 = para ...
      click . . .
    end
    @s2 = stack do ...
      ...
  end

   @s1.style
   @s2.style

end

But shoes doesn't draw the flows until it runs the whole .each do loop
which means code written this way returns @p1.width = 0 on each of the
styles and puts all of the stacks on top of each other!!


That's where I about gave up and found out about this mailing list.


:-)



So like I said I'm new. Is this kind of question inappropriate (too
specific, too long)? Should I be including the entirety of the project so
that potential do-gooders can actually help by seeing this thing up and
running (github?) or is a summary format (like above) ok? Should I have
just started out by asking this question instead of beating around the bush
with the click proc questions?

Shoes rocks,

KC






On Thu, Jul 11, 2013 at 3:21 PM, Douglas Allen <kb9agt@gmail.com> wrote:

> Then there is click anywhere.
> Shoes.app do
>
>   alert_proc = Proc.new {alert "This Works!"}
>   para "Click anywhere", stroke: blue
>   click do
>      alert_proc.call
>   end
>
> end
>
>
> On Thu, Jul 11, 2013 at 3:29 PM, KC Erb <iamkcerb@gmail.com> wrote:
>
>> Oh wow! Thanks a lot Doug, I didn't realize github was so user friendly.
>> I'll get crackin' on this right away.
>>
>>
>> On Thu, Jul 11, 2013 at 2:22 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>
>>> http://try.github.io/levels/1/challenges/1
>>>
>>>
>>> On Thu, Jul 11, 2013 at 3:20 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>>
>>>> Just fork it first. That makes a copy of it to your own repository.
>>>> Then be sure to have git installed or use http://windows.github.com/
>>>> then click the clone button. That will download it to your system for
>>>> you to work on.
>>>>
>>>> Later you may learn about branches, pushing and pull requests.
>>>> And be sure to try out the codeschool quickstart for github. That is a
>>>> great one for just getting started with github.
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Jul 11, 2013 at 2:43 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>>
>>>>> Thanks Doug, Tobias nailed this one though, I'm not so much interested
>>>>> in clicking on things in general as I am on clicking on a para and running
>>>>> a proc.
>>>>>
>>>>>
>>>>> On Thu, Jul 11, 2013 at 1:34 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>
>>>>>> Shoes.app { button("Click me!") { alert("Good job.") } }
>>>>>>
>>>>>> from http://shoesrb.com/manual/Hello.html
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 11, 2013 at 2:30 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>
>>>>>>> I would suggest you try to find a good example. That always helps me
>>>>>>> if I can see it work the play around with it.
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jul 11, 2013 at 2:25 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>>
>>>>>>>> What if you just call alert with click? Then try to pass the block
>>>>>>>> if that works.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> Based on the manual (http://shoesrb.com/manual/Styles.html) I
>>>>>>>>> expect that the following should work:
>>>>>>>>>
>>>>>>>>>  Shoes.app do
>>>>>>>>>
>>>>>>>>>   alert_proc = Proc.new {alert "This Works!"}
>>>>>>>>>
>>>>>>>>>   para "Click Me", stroke: blue, click: alert_proc
>>>>>>>>>
>>>>>>>>> end
>>>>>>>>>
>>>>>>>>> But I don't see it working in Shoes3 or 4. When I try to run it I
>>>>>>>>> get the para with the correct stroke formatting but it doesn't 
respond to
>>>>>>>>> clicks. No error message though.
>>>>>>>>>
>>>>>>>>> What am I missing?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> KC Erb
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>  "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."
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>  "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."
>>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>>  "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."
>>
>
>


-- 
 "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] :click => proc

From:
Douglas Allen
Date:
2013-07-12 @ 00:17
How much code do you have? You could just post it to a gist or two on
github. Do you know about gists?
https://help.github.com/articles/creating-gists
Here is one of mine:
https://gist.github.com/DouglasAllen/3854424


On Thu, Jul 11, 2013 at 5:22 PM, KC Erb <iamkcerb@gmail.com> wrote:

> While I'm wading into github and figuring out why para (and others) isn't
> clickable, it *would* be great to find a workaround.
>
> What I'm *actually* trying to get out of click is a call to a method I
> call drag_and_drop. The method takes x, and y, from click and some
> information about the thing that got clicked on and then
> behaves appropriately from there:
>
> def drag_and_drop ( user_id, x, y)
>   contents (not secret, just irrelevant)
> end
>
> So far it has worked great since everything I needed to drag and drop was
> a stack with someone's name in it.
>
> stack do
>   para people_info[user_id].name
>   click do |button, x, y|
>     drag_and_drop(user_id, x, y)
>   end
> end
>
> (people_info is a hash of "People" Structs indexed by user_id)
>
> But now I have a stack with several names in it and I want drag and drop
> to be able to see which name I clicked on. The nicest way to do that would
> be
>
> flow do
>   para people_info[user_id_arr[0]].name, click: {|button, x, y|
> drag_and_drop(user_id_array[0], x ,y) }
>   para people_info[user_id_arr[1]].name, . . .
>   ...
> end
>
> It should look like this:
>
> =========================
> = Carl Adams & Cody Froo         =
> =========================
>
>
> But with :click not working the only thing I've come up with is:
>
> flow do
>   stack do
>     para
>     click
>   end
>   stack do
>     para
>     click
>   end
>   ...
> end
>
> This doesn't work though, because the stacks are stacking (instead of
> flowing) since by default they each have a width of 100%. (Which produces
> this:
>
> =========================
> = Carl Adams &                        =
> = Cody Froo                             =
> =========================
>
> )
>
>  I have to fix the widths of the stacks so that they sum up to 100% which
> is tough since I don't know the width of a para until after it is drawn.
>
> That's not the end though! I did try to have Shoes look at the size of the
> stack after it was drawn and redraw it to fit the para snuggly and add up
> to 100% after it was drawn:
>
>
>     (I named each stack and para so that I could call them later, is there
> a better way?)
>
>       @s1.style( width: @p1.width)
>       @s2.style( width: @p2.width)
>       @s3.style( width: @p3.width)
>       @s4.style( width: @p4.width)
>       @s4.style( width: -(@p1.width + @p2.width + @p3.width + @p4.width))
>
> But now the problem is that I'm drawing each of these flows (by flow I
> mean the flow with all the para stacks in it) in a loop:
>
> groups.each do
>
>   flow do
>     @s1 = stack do
>       @p1 = para ...
>       click . . .
>     end
>     @s2 = stack do ...
>       ...
>   end
>
>    @s1.style
>    @s2.style
>
> end
>
> But shoes doesn't draw the flows until it runs the whole .each do loop
> which means code written this way returns @p1.width = 0 on each of the
> styles and puts all of the stacks on top of each other!!
>
>
> That's where I about gave up and found out about this mailing list.
>
>
> :-)
>
>
>
> So like I said I'm new. Is this kind of question inappropriate (too
> specific, too long)? Should I be including the entirety of the project so
> that potential do-gooders can actually help by seeing this thing up and
> running (github?) or is a summary format (like above) ok? Should I have
> just started out by asking this question instead of beating around the bush
> with the click proc questions?
>
> Shoes rocks,
>
> KC
>
>
>
>
>
>
> On Thu, Jul 11, 2013 at 3:21 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>
>> Then there is click anywhere.
>> Shoes.app do
>>
>>   alert_proc = Proc.new {alert "This Works!"}
>>   para "Click anywhere", stroke: blue
>>   click do
>>      alert_proc.call
>>   end
>>
>> end
>>
>>
>> On Thu, Jul 11, 2013 at 3:29 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>
>>> Oh wow! Thanks a lot Doug, I didn't realize github was so user friendly.
>>> I'll get crackin' on this right away.
>>>
>>>
>>> On Thu, Jul 11, 2013 at 2:22 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>>
>>>> http://try.github.io/levels/1/challenges/1
>>>>
>>>>
>>>> On Thu, Jul 11, 2013 at 3:20 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>
>>>>> Just fork it first. That makes a copy of it to your own repository.
>>>>> Then be sure to have git installed or use http://windows.github.com/
>>>>> then click the clone button. That will download it to your system for
>>>>> you to work on.
>>>>>
>>>>> Later you may learn about branches, pushing and pull requests.
>>>>> And be sure to try out the codeschool quickstart for github. That is a
>>>>> great one for just getting started with github.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Jul 11, 2013 at 2:43 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>>>
>>>>>> Thanks Doug, Tobias nailed this one though, I'm not so much
>>>>>> interested in clicking on things in general as I am on clicking on a para
>>>>>> and running a proc.
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 11, 2013 at 1:34 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>
>>>>>>> Shoes.app { button("Click me!") { alert("Good job.") } }
>>>>>>>
>>>>>>> from http://shoesrb.com/manual/Hello.html
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jul 11, 2013 at 2:30 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>>
>>>>>>>> I would suggest you try to find a good example. That always helps
>>>>>>>> me if I can see it work the play around with it.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Jul 11, 2013 at 2:25 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>>>
>>>>>>>>> What if you just call alert with click? Then try to pass the block
>>>>>>>>> if that works.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com>wrote:
>>>>>>>>>
>>>>>>>>>> Hi all,
>>>>>>>>>>
>>>>>>>>>> Based on the manual (http://shoesrb.com/manual/Styles.html) I
>>>>>>>>>> expect that the following should work:
>>>>>>>>>>
>>>>>>>>>>  Shoes.app do
>>>>>>>>>>
>>>>>>>>>>   alert_proc = Proc.new {alert "This Works!"}
>>>>>>>>>>
>>>>>>>>>>   para "Click Me", stroke: blue, click: alert_proc
>>>>>>>>>>
>>>>>>>>>> end
>>>>>>>>>>
>>>>>>>>>> But I don't see it working in Shoes3 or 4. When I try to run it I
>>>>>>>>>> get the para with the correct stroke formatting but it doesn't 
respond to
>>>>>>>>>> clicks. No error message though.
>>>>>>>>>>
>>>>>>>>>> What am I missing?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> KC Erb
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>  "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."
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>  "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."
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>>  "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."
>>>
>>
>>
>
>
> --
>  "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] :click => proc

From:
Douglas Allen
Date:
2013-07-12 @ 00:54
I just ran sdoc on my local of green_shoes.

results:
Files:      176

Classes:     78 ( 66 undocumented)
Modules:     28 ( 23 undocumented)
Constants:   62 ( 54 undocumented)
Attributes: 103 ( 99 undocumented)
Methods:    605 (475 undocumented)

Total:      876 (717 undocumented)
 18.15% documented

So you can see what is needed in the way of documentation. I'll try a run
of it for shoes 4.



On Thu, Jul 11, 2013 at 7:17 PM, Douglas Allen <kb9agt@gmail.com> wrote:

> How much code do you have? You could just post it to a gist or two on
> github. Do you know about gists?
> https://help.github.com/articles/creating-gists
> Here is one of mine:
> https://gist.github.com/DouglasAllen/3854424
>
>
> On Thu, Jul 11, 2013 at 5:22 PM, KC Erb <iamkcerb@gmail.com> wrote:
>
>> While I'm wading into github and figuring out why para (and others) isn't
>> clickable, it *would* be great to find a workaround.
>>
>> What I'm *actually* trying to get out of click is a call to a method I
>> call drag_and_drop. The method takes x, and y, from click and some
>> information about the thing that got clicked on and then
>> behaves appropriately from there:
>>
>> def drag_and_drop ( user_id, x, y)
>>   contents (not secret, just irrelevant)
>> end
>>
>> So far it has worked great since everything I needed to drag and drop was
>> a stack with someone's name in it.
>>
>> stack do
>>   para people_info[user_id].name
>>   click do |button, x, y|
>>     drag_and_drop(user_id, x, y)
>>   end
>> end
>>
>> (people_info is a hash of "People" Structs indexed by user_id)
>>
>> But now I have a stack with several names in it and I want drag and drop
>> to be able to see which name I clicked on. The nicest way to do that would
>> be
>>
>> flow do
>>   para people_info[user_id_arr[0]].name, click: {|button, x, y|
>> drag_and_drop(user_id_array[0], x ,y) }
>>   para people_info[user_id_arr[1]].name, . . .
>>   ...
>> end
>>
>> It should look like this:
>>
>> =========================
>> = Carl Adams & Cody Froo         =
>> =========================
>>
>>
>> But with :click not working the only thing I've come up with is:
>>
>> flow do
>>   stack do
>>     para
>>     click
>>   end
>>   stack do
>>     para
>>     click
>>   end
>>   ...
>> end
>>
>> This doesn't work though, because the stacks are stacking (instead of
>> flowing) since by default they each have a width of 100%. (Which produces
>> this:
>>
>> =========================
>> = Carl Adams &                        =
>> = Cody Froo                             =
>> =========================
>>
>> )
>>
>>  I have to fix the widths of the stacks so that they sum up to 100% which
>> is tough since I don't know the width of a para until after it is drawn.
>>
>> That's not the end though! I did try to have Shoes look at the size of
>> the stack after it was drawn and redraw it to fit the para snuggly and add
>> up to 100% after it was drawn:
>>
>>
>>     (I named each stack and para so that I could call them later, is
>> there a better way?)
>>
>>       @s1.style( width: @p1.width)
>>       @s2.style( width: @p2.width)
>>       @s3.style( width: @p3.width)
>>       @s4.style( width: @p4.width)
>>       @s4.style( width: -(@p1.width + @p2.width + @p3.width + @p4.width))
>>
>> But now the problem is that I'm drawing each of these flows (by flow I
>> mean the flow with all the para stacks in it) in a loop:
>>
>> groups.each do
>>
>>   flow do
>>     @s1 = stack do
>>       @p1 = para ...
>>       click . . .
>>     end
>>     @s2 = stack do ...
>>       ...
>>   end
>>
>>    @s1.style
>>    @s2.style
>>
>> end
>>
>> But shoes doesn't draw the flows until it runs the whole .each do loop
>> which means code written this way returns @p1.width = 0 on each of the
>> styles and puts all of the stacks on top of each other!!
>>
>>
>> That's where I about gave up and found out about this mailing list.
>>
>>
>> :-)
>>
>>
>>
>> So like I said I'm new. Is this kind of question inappropriate (too
>> specific, too long)? Should I be including the entirety of the project so
>> that potential do-gooders can actually help by seeing this thing up and
>> running (github?) or is a summary format (like above) ok? Should I have
>> just started out by asking this question instead of beating around the bush
>> with the click proc questions?
>>
>> Shoes rocks,
>>
>> KC
>>
>>
>>
>>
>>
>>
>> On Thu, Jul 11, 2013 at 3:21 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>
>>> Then there is click anywhere.
>>> Shoes.app do
>>>
>>>   alert_proc = Proc.new {alert "This Works!"}
>>>   para "Click anywhere", stroke: blue
>>>   click do
>>>      alert_proc.call
>>>   end
>>>
>>> end
>>>
>>>
>>> On Thu, Jul 11, 2013 at 3:29 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>
>>>> Oh wow! Thanks a lot Doug, I didn't realize github was so user
>>>> friendly. I'll get crackin' on this right away.
>>>>
>>>>
>>>> On Thu, Jul 11, 2013 at 2:22 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>
>>>>> http://try.github.io/levels/1/challenges/1
>>>>>
>>>>>
>>>>> On Thu, Jul 11, 2013 at 3:20 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>
>>>>>> Just fork it first. That makes a copy of it to your own repository.
>>>>>> Then be sure to have git installed or use http://windows.github.com/
>>>>>> then click the clone button. That will download it to your system for
>>>>>> you to work on.
>>>>>>
>>>>>> Later you may learn about branches, pushing and pull requests.
>>>>>> And be sure to try out the codeschool quickstart for github. That is
>>>>>> a great one for just getting started with github.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 11, 2013 at 2:43 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>>>>
>>>>>>> Thanks Doug, Tobias nailed this one though, I'm not so much
>>>>>>> interested in clicking on things in general as I am on clicking on a para
>>>>>>> and running a proc.
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jul 11, 2013 at 1:34 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>>
>>>>>>>> Shoes.app { button("Click me!") { alert("Good job.") } }
>>>>>>>>
>>>>>>>> from http://shoesrb.com/manual/Hello.html
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Jul 11, 2013 at 2:30 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>>>
>>>>>>>>> I would suggest you try to find a good example. That always helps
>>>>>>>>> me if I can see it work the play around with it.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Jul 11, 2013 at 2:25 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>>>>
>>>>>>>>>> What if you just call alert with click? Then try to pass the
>>>>>>>>>> block if that works.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com>wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi all,
>>>>>>>>>>>
>>>>>>>>>>> Based on the manual (http://shoesrb.com/manual/Styles.html) I
>>>>>>>>>>> expect that the following should work:
>>>>>>>>>>>
>>>>>>>>>>>  Shoes.app do
>>>>>>>>>>>
>>>>>>>>>>>   alert_proc = Proc.new {alert "This Works!"}
>>>>>>>>>>>
>>>>>>>>>>>   para "Click Me", stroke: blue, click: alert_proc
>>>>>>>>>>>
>>>>>>>>>>> end
>>>>>>>>>>>
>>>>>>>>>>> But I don't see it working in Shoes3 or 4. When I try to run it
>>>>>>>>>>> I get the para with the correct stroke formatting but it 
doesn't respond to
>>>>>>>>>>> clicks. No error message though.
>>>>>>>>>>>
>>>>>>>>>>> What am I missing?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>> KC Erb
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>  "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."
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>  "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."
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>  "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."
>>>>
>>>
>>>
>>
>>
>> --
>>  "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] :click => proc

From:
Douglas Allen
Date:
2013-07-12 @ 01:07
So here's the sdoc results for shoes 4

Files:       651

Classes:     171 ( 160 undocumented)
Modules:      41 (  29 undocumented)
Constants:    71 (  65 undocumented)
Attributes:  340 ( 324 undocumented)
Methods:     648 ( 539 undocumented)

Total:      1271 (1117 undocumented)
 12.12% documented

So tere you go. If you know how somethin works then try to document it and
push it to a branch. I don't see any method for click in para.

It's all good in theory but the real stuff is in the code.



On Thu, Jul 11, 2013 at 7:54 PM, Douglas Allen <kb9agt@gmail.com> wrote:

> I just ran sdoc on my local of green_shoes.
>
> results:
> Files:      176
>
> Classes:     78 ( 66 undocumented)
> Modules:     28 ( 23 undocumented)
> Constants:   62 ( 54 undocumented)
> Attributes: 103 ( 99 undocumented)
> Methods:    605 (475 undocumented)
>
> Total:      876 (717 undocumented)
>  18.15% documented
>
> So you can see what is needed in the way of documentation. I'll try a run
> of it for shoes 4.
>
>
>
> On Thu, Jul 11, 2013 at 7:17 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>
>> How much code do you have? You could just post it to a gist or two on
>> github. Do you know about gists?
>> https://help.github.com/articles/creating-gists
>> Here is one of mine:
>> https://gist.github.com/DouglasAllen/3854424
>>
>>
>> On Thu, Jul 11, 2013 at 5:22 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>
>>> While I'm wading into github and figuring out why para (and others)
>>> isn't clickable, it *would* be great to find a workaround.
>>>
>>> What I'm *actually* trying to get out of click is a call to a method I
>>> call drag_and_drop. The method takes x, and y, from click and some
>>> information about the thing that got clicked on and then
>>> behaves appropriately from there:
>>>
>>> def drag_and_drop ( user_id, x, y)
>>>   contents (not secret, just irrelevant)
>>> end
>>>
>>> So far it has worked great since everything I needed to drag and drop
>>> was a stack with someone's name in it.
>>>
>>> stack do
>>>   para people_info[user_id].name
>>>   click do |button, x, y|
>>>     drag_and_drop(user_id, x, y)
>>>   end
>>> end
>>>
>>> (people_info is a hash of "People" Structs indexed by user_id)
>>>
>>> But now I have a stack with several names in it and I want drag and drop
>>> to be able to see which name I clicked on. The nicest way to do that would
>>> be
>>>
>>> flow do
>>>   para people_info[user_id_arr[0]].name, click: {|button, x, y|
>>> drag_and_drop(user_id_array[0], x ,y) }
>>>   para people_info[user_id_arr[1]].name, . . .
>>>   ...
>>> end
>>>
>>> It should look like this:
>>>
>>> =========================
>>> = Carl Adams & Cody Froo         =
>>> =========================
>>>
>>>
>>> But with :click not working the only thing I've come up with is:
>>>
>>> flow do
>>>   stack do
>>>     para
>>>     click
>>>   end
>>>   stack do
>>>     para
>>>     click
>>>   end
>>>   ...
>>> end
>>>
>>> This doesn't work though, because the stacks are stacking (instead of
>>> flowing) since by default they each have a width of 100%. (Which produces
>>> this:
>>>
>>> =========================
>>> = Carl Adams &                        =
>>> = Cody Froo                             =
>>> =========================
>>>
>>> )
>>>
>>>  I have to fix the widths of the stacks so that they sum up to 100%
>>> which is tough since I don't know the width of a para until after it is
>>> drawn.
>>>
>>> That's not the end though! I did try to have Shoes look at the size of
>>> the stack after it was drawn and redraw it to fit the para snuggly and add
>>> up to 100% after it was drawn:
>>>
>>>
>>>     (I named each stack and para so that I could call them later, is
>>> there a better way?)
>>>
>>>       @s1.style( width: @p1.width)
>>>       @s2.style( width: @p2.width)
>>>       @s3.style( width: @p3.width)
>>>       @s4.style( width: @p4.width)
>>>       @s4.style( width: -(@p1.width + @p2.width + @p3.width + @p4
>>> .width))
>>>
>>> But now the problem is that I'm drawing each of these flows (by flow I
>>> mean the flow with all the para stacks in it) in a loop:
>>>
>>> groups.each do
>>>
>>>   flow do
>>>     @s1 = stack do
>>>       @p1 = para ...
>>>       click . . .
>>>     end
>>>     @s2 = stack do ...
>>>       ...
>>>   end
>>>
>>>    @s1.style
>>>    @s2.style
>>>
>>> end
>>>
>>> But shoes doesn't draw the flows until it runs the whole .each do loop
>>> which means code written this way returns @p1.width = 0 on each of the
>>> styles and puts all of the stacks on top of each other!!
>>>
>>>
>>> That's where I about gave up and found out about this mailing list.
>>>
>>>
>>> :-)
>>>
>>>
>>>
>>> So like I said I'm new. Is this kind of question inappropriate (too
>>> specific, too long)? Should I be including the entirety of the project so
>>> that potential do-gooders can actually help by seeing this thing up and
>>> running (github?) or is a summary format (like above) ok? Should I have
>>> just started out by asking this question instead of beating around the bush
>>> with the click proc questions?
>>>
>>> Shoes rocks,
>>>
>>> KC
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Jul 11, 2013 at 3:21 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>>
>>>> Then there is click anywhere.
>>>> Shoes.app do
>>>>
>>>>   alert_proc = Proc.new {alert "This Works!"}
>>>>   para "Click anywhere", stroke: blue
>>>>   click do
>>>>      alert_proc.call
>>>>   end
>>>>
>>>> end
>>>>
>>>>
>>>> On Thu, Jul 11, 2013 at 3:29 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>>
>>>>> Oh wow! Thanks a lot Doug, I didn't realize github was so user
>>>>> friendly. I'll get crackin' on this right away.
>>>>>
>>>>>
>>>>> On Thu, Jul 11, 2013 at 2:22 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>
>>>>>> http://try.github.io/levels/1/challenges/1
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 11, 2013 at 3:20 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>
>>>>>>> Just fork it first. That makes a copy of it to your own repository.
>>>>>>> Then be sure to have git installed or use http://windows.github.com/
>>>>>>> then click the clone button. That will download it to your system
>>>>>>> for you to work on.
>>>>>>>
>>>>>>> Later you may learn about branches, pushing and pull requests.
>>>>>>> And be sure to try out the codeschool quickstart for github. That is
>>>>>>> a great one for just getting started with github.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jul 11, 2013 at 2:43 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>>>>>
>>>>>>>> Thanks Doug, Tobias nailed this one though, I'm not so much
>>>>>>>> interested in clicking on things in general as I am on clicking on a para
>>>>>>>> and running a proc.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Jul 11, 2013 at 1:34 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>>>
>>>>>>>>> Shoes.app { button("Click me!") { alert("Good job.") } }
>>>>>>>>>
>>>>>>>>> from http://shoesrb.com/manual/Hello.html
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Jul 11, 2013 at 2:30 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>>>>
>>>>>>>>>> I would suggest you try to find a good example. That always helps
>>>>>>>>>> me if I can see it work the play around with it.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Jul 11, 2013 at 2:25 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>>>>>
>>>>>>>>>>> What if you just call alert with click? Then try to pass the
>>>>>>>>>>> block if that works.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com>wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi all,
>>>>>>>>>>>>
>>>>>>>>>>>> Based on the manual (http://shoesrb.com/manual/Styles.html) I
>>>>>>>>>>>> expect that the following should work:
>>>>>>>>>>>>
>>>>>>>>>>>>  Shoes.app do
>>>>>>>>>>>>
>>>>>>>>>>>>   alert_proc = Proc.new {alert "This Works!"}
>>>>>>>>>>>>
>>>>>>>>>>>>   para "Click Me", stroke: blue, click: alert_proc
>>>>>>>>>>>>
>>>>>>>>>>>> end
>>>>>>>>>>>>
>>>>>>>>>>>> But I don't see it working in Shoes3 or 4. When I try to run it
>>>>>>>>>>>> I get the para with the correct stroke formatting but it 
doesn't respond to
>>>>>>>>>>>> clicks. No error message though.
>>>>>>>>>>>>
>>>>>>>>>>>> What am I missing?
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>> KC Erb
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>  "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."
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>>  "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."
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>  "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."
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>>  "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] :click => proc

From:
Douglas Allen
Date:
2013-07-12 @ 01:24
We're doing better with Policeman.

Files:       343

Classes:     210 ( 182 undocumented)
Modules:      64 (  54 undocumented)
Constants:   136 ( 128 undocumented)
Attributes:   64 (  57 undocumented)
Methods:     856 ( 607 undocumented)

Total:      1330 (1028 undocumented)
 22.71% documented


On Thu, Jul 11, 2013 at 8:07 PM, Douglas Allen <kb9agt@gmail.com> wrote:

> So here's the sdoc results for shoes 4
>
> Files:       651
>
> Classes:     171 ( 160 undocumented)
> Modules:      41 (  29 undocumented)
> Constants:    71 (  65 undocumented)
> Attributes:  340 ( 324 undocumented)
> Methods:     648 ( 539 undocumented)
>
> Total:      1271 (1117 undocumented)
>  12.12% documented
>
> So tere you go. If you know how somethin works then try to document it and
> push it to a branch. I don't see any method for click in para.
>
> It's all good in theory but the real stuff is in the code.
>
>
>
> On Thu, Jul 11, 2013 at 7:54 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>
>> I just ran sdoc on my local of green_shoes.
>>
>> results:
>> Files:      176
>>
>> Classes:     78 ( 66 undocumented)
>> Modules:     28 ( 23 undocumented)
>> Constants:   62 ( 54 undocumented)
>> Attributes: 103 ( 99 undocumented)
>> Methods:    605 (475 undocumented)
>>
>> Total:      876 (717 undocumented)
>>  18.15% documented
>>
>> So you can see what is needed in the way of documentation. I'll try a run
>> of it for shoes 4.
>>
>>
>>
>> On Thu, Jul 11, 2013 at 7:17 PM, Douglas Allen <kb9agt@gmail.com> wrote:
>>
>>> How much code do you have? You could just post it to a gist or two on
>>> github. Do you know about gists?
>>> https://help.github.com/articles/creating-gists
>>> Here is one of mine:
>>> https://gist.github.com/DouglasAllen/3854424
>>>
>>>
>>> On Thu, Jul 11, 2013 at 5:22 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>
>>>> While I'm wading into github and figuring out why para (and others)
>>>> isn't clickable, it *would* be great to find a workaround.
>>>>
>>>> What I'm *actually* trying to get out of click is a call to a method I
>>>> call drag_and_drop. The method takes x, and y, from click and some
>>>> information about the thing that got clicked on and then
>>>> behaves appropriately from there:
>>>>
>>>> def drag_and_drop ( user_id, x, y)
>>>>   contents (not secret, just irrelevant)
>>>> end
>>>>
>>>> So far it has worked great since everything I needed to drag and drop
>>>> was a stack with someone's name in it.
>>>>
>>>> stack do
>>>>   para people_info[user_id].name
>>>>   click do |button, x, y|
>>>>     drag_and_drop(user_id, x, y)
>>>>   end
>>>> end
>>>>
>>>> (people_info is a hash of "People" Structs indexed by user_id)
>>>>
>>>> But now I have a stack with several names in it and I want drag and
>>>> drop to be able to see which name I clicked on. The nicest way to do that
>>>> would be
>>>>
>>>> flow do
>>>>   para people_info[user_id_arr[0]].name, click: {|button, x, y|
>>>> drag_and_drop(user_id_array[0], x ,y) }
>>>>   para people_info[user_id_arr[1]].name, . . .
>>>>   ...
>>>> end
>>>>
>>>> It should look like this:
>>>>
>>>> =========================
>>>> = Carl Adams & Cody Froo         =
>>>> =========================
>>>>
>>>>
>>>> But with :click not working the only thing I've come up with is:
>>>>
>>>> flow do
>>>>   stack do
>>>>     para
>>>>     click
>>>>   end
>>>>   stack do
>>>>     para
>>>>     click
>>>>   end
>>>>   ...
>>>> end
>>>>
>>>> This doesn't work though, because the stacks are stacking (instead of
>>>> flowing) since by default they each have a width of 100%. (Which produces
>>>> this:
>>>>
>>>> =========================
>>>> = Carl Adams &                        =
>>>> = Cody Froo                             =
>>>> =========================
>>>>
>>>> )
>>>>
>>>>  I have to fix the widths of the stacks so that they sum up to 100%
>>>> which is tough since I don't know the width of a para until after it is
>>>> drawn.
>>>>
>>>> That's not the end though! I did try to have Shoes look at the size of
>>>> the stack after it was drawn and redraw it to fit the para snuggly and add
>>>> up to 100% after it was drawn:
>>>>
>>>>
>>>>     (I named each stack and para so that I could call them later, is
>>>> there a better way?)
>>>>
>>>>       @s1.style( width: @p1.width)
>>>>       @s2.style( width: @p2.width)
>>>>       @s3.style( width: @p3.width)
>>>>       @s4.style( width: @p4.width)
>>>>       @s4.style( width: -(@p1.width + @p2.width + @p3.width + @p4
>>>> .width))
>>>>
>>>> But now the problem is that I'm drawing each of these flows (by flow I
>>>> mean the flow with all the para stacks in it) in a loop:
>>>>
>>>> groups.each do
>>>>
>>>>   flow do
>>>>     @s1 = stack do
>>>>       @p1 = para ...
>>>>       click . . .
>>>>     end
>>>>     @s2 = stack do ...
>>>>       ...
>>>>   end
>>>>
>>>>    @s1.style
>>>>    @s2.style
>>>>
>>>> end
>>>>
>>>> But shoes doesn't draw the flows until it runs the whole .each do loop
>>>> which means code written this way returns @p1.width = 0 on each of the
>>>> styles and puts all of the stacks on top of each other!!
>>>>
>>>>
>>>> That's where I about gave up and found out about this mailing list.
>>>>
>>>>
>>>> :-)
>>>>
>>>>
>>>>
>>>> So like I said I'm new. Is this kind of question inappropriate (too
>>>> specific, too long)? Should I be including the entirety of the project so
>>>> that potential do-gooders can actually help by seeing this thing up and
>>>> running (github?) or is a summary format (like above) ok? Should I have
>>>> just started out by asking this question instead of beating around the bush
>>>> with the click proc questions?
>>>>
>>>> Shoes rocks,
>>>>
>>>> KC
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Jul 11, 2013 at 3:21 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>
>>>>> Then there is click anywhere.
>>>>> Shoes.app do
>>>>>
>>>>>   alert_proc = Proc.new {alert "This Works!"}
>>>>>   para "Click anywhere", stroke: blue
>>>>>   click do
>>>>>      alert_proc.call
>>>>>   end
>>>>>
>>>>> end
>>>>>
>>>>>
>>>>> On Thu, Jul 11, 2013 at 3:29 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>>>
>>>>>> Oh wow! Thanks a lot Doug, I didn't realize github was so user
>>>>>> friendly. I'll get crackin' on this right away.
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 11, 2013 at 2:22 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>
>>>>>>> http://try.github.io/levels/1/challenges/1
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jul 11, 2013 at 3:20 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>>
>>>>>>>> Just fork it first. That makes a copy of it to your own repository.
>>>>>>>> Then be sure to have git installed or use
>>>>>>>> http://windows.github.com/
>>>>>>>> then click the clone button. That will download it to your system
>>>>>>>> for you to work on.
>>>>>>>>
>>>>>>>> Later you may learn about branches, pushing and pull requests.
>>>>>>>> And be sure to try out the codeschool quickstart for github. That
>>>>>>>> is a great one for just getting started with github.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Jul 11, 2013 at 2:43 PM, KC Erb <iamkcerb@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Thanks Doug, Tobias nailed this one though, I'm not so much
>>>>>>>>> interested in clicking on things in general as I am on clicking 
on a para
>>>>>>>>> and running a proc.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Jul 11, 2013 at 1:34 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>>>>
>>>>>>>>>> Shoes.app { button("Click me!") { alert("Good job.") } }
>>>>>>>>>>
>>>>>>>>>> from http://shoesrb.com/manual/Hello.html
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Jul 11, 2013 at 2:30 PM, Douglas Allen <kb9agt@gmail.com>wrote:
>>>>>>>>>>
>>>>>>>>>>> I would suggest you try to find a good example. That always
>>>>>>>>>>> helps me if I can see it work the play around with it.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Jul 11, 2013 at 2:25 PM, Douglas Allen <kb9agt@gmail.com
>>>>>>>>>>> > wrote:
>>>>>>>>>>>
>>>>>>>>>>>> What if you just call alert with click? Then try to pass the
>>>>>>>>>>>> block if that works.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com>wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi all,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Based on the manual (http://shoesrb.com/manual/Styles.html) I
>>>>>>>>>>>>> expect that the following should work:
>>>>>>>>>>>>>
>>>>>>>>>>>>>  Shoes.app do
>>>>>>>>>>>>>
>>>>>>>>>>>>>   alert_proc = Proc.new {alert "This Works!"}
>>>>>>>>>>>>>
>>>>>>>>>>>>>   para "Click Me", stroke: blue, click: alert_proc
>>>>>>>>>>>>>
>>>>>>>>>>>>> end
>>>>>>>>>>>>>
>>>>>>>>>>>>> But I don't see it working in Shoes3 or 4. When I try to run
>>>>>>>>>>>>> it I get the para with the correct stroke formatting but it 
doesn't respond
>>>>>>>>>>>>> to clicks. No error message though.
>>>>>>>>>>>>>
>>>>>>>>>>>>> What am I missing?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>> KC Erb
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>  "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."
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>  "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."
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>  "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."
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>  "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] :click => proc

From:
ashbb
Date:
2013-07-12 @ 11:44
Hi KC and folks,

Sorry for my late reply.
But I have to say the following:

- Shoes TextBlock elements (i.e. para, title, etc.) doesn't support `click`
option. Use `link` method.

Try out this snippet:

 Shoes.app do
    alert_proc = Proc.new {alert "This Works!"}
    para link("Click Me", &alert_proc)
 end

Regards,
ashbb

Re: [shoes] :click => proc

From:
Kc Erb
Date:
2013-07-12 @ 19:28
Yeah, I forgot to mention that I tried link but I don't want the text to be
blue, underlined, etc. When I tried

*para link("click", &alert_proc), stroke: white*

the styling is unchanged and it throws an error when I try

*para link("click", &alert_proc, stroke: white) *

*error -> syntax error, unexpected ',' expecting ')'*

If there is a way to style link? That'd fix my problem!





On Fri, Jul 12, 2013 at 5:44 AM, ashbb <ashbbb@gmail.com> wrote:

> Hi KC and folks,
>
> Sorry for my late reply.
> But I have to say the following:
>
> - Shoes TextBlock elements (i.e. para, title, etc.) doesn't support
> `click` option. Use `link` method.
>
> Try out this snippet:
>
>
>  Shoes.app do
>     alert_proc = Proc.new {alert "This Works!"}
>     para link("Click Me", &alert_proc)
>  end
>
> Regards,
> ashbb
>



-- 
 "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] :click => proc

From:
Faraaz Ismail
Date:
2013-07-12 @ 19:54
Hey KC,

Although I'm not sure if you can change the color of the text and remove
the underline for a link (I wasn't able to when trying), you could set
undercolor to the background color to hide it. This is what I did:

 Shoes.app do
    alert_proc = Proc.new {alert "This Works!"}
    para link("Click Me", &alert_proc), undercolor: white
 end

It's not the best solution, but hope it helps.

Faraaz

On Fri, Jul 12, 2013 at 2:28 PM, KC Erb <iamkcerb@gmail.com> wrote:

>
> Yeah, I forgot to mention that I tried link but I don't want the text to
> be blue, underlined, etc. When I tried
>
> *para link("click", &alert_proc), stroke: white*
>
> the styling is unchanged and it throws an error when I try
>
> *para link("click", &alert_proc, stroke: white) *
>
> *error -> syntax error, unexpected ',' expecting ')'*
>
> If there is a way to style link? That'd fix my problem!
>
>
>
>
>
> On Fri, Jul 12, 2013 at 5:44 AM, ashbb <ashbbb@gmail.com> wrote:
>
>> Hi KC and folks,
>>
>> Sorry for my late reply.
>> But I have to say the following:
>>
>> - Shoes TextBlock elements (i.e. para, title, etc.) doesn't support
>> `click` option. Use `link` method.
>>
>> Try out this snippet:
>>
>>
>>  Shoes.app do
>>     alert_proc = Proc.new {alert "This Works!"}
>>     para link("Click Me", &alert_proc)
>>  end
>>
>> Regards,
>> ashbb
>>
>
>
>
> --
>  "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] :click => proc

From:
ashbb
Date:
2013-07-13 @ 08:23
Hi KC and folks,

Try out this one with Shoes 3. Shoes 4 is a work in progress. ;-)

Shoes.app do
  style Link, underline: nil, stroke: green
  style LinkHover, underline: nil, stroke: red
  alert_proc = Proc.new {alert "This Works!"}
  para link("Click Me", &alert_proc)
end

ashbb

Re: [shoes] :click => proc

From:
Tobias Pfeiffer
Date:
2013-07-13 @ 08:55
That works? Man you always amaze me with stuff possible in shoes that I 
did not know about :-)

On Sat 13 Jul 2013 10:23:50 AM CEST, ashbb wrote:
> Hi KC and folks,
>
> Try out this one with Shoes 3. Shoes 4 is a work in progress. ;-)
>
> Shoes.app do
>   style Link, underline: nil, stroke: green
>   style LinkHover, underline: nil, stroke: red
>   alert_proc = Proc.new {alert "This Works!"}
>   para link("Click Me", &alert_proc)
> end
>
> ashbb

Re: [shoes] :click => proc

From:
Kc Erb
Date:
2013-07-13 @ 14:52
Yay!!! Thank you so much!


On Sat, Jul 13, 2013 at 2:23 AM, ashbb <ashbbb@gmail.com> wrote:

> Hi KC and folks,
>
> Try out this one with Shoes 3. Shoes 4 is a work in progress. ;-)
>
> Shoes.app do
>   style Link, underline: nil, stroke: green
>   style LinkHover, underline: nil, stroke: red
>
>   alert_proc = Proc.new {alert "This Works!"}
>   para link("Click Me", &alert_proc)
> end
>
> ashbb
>



-- 
 "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] :click => proc

From:
Douglas Allen
Date:
2013-07-12 @ 16:13
Thanks Satoshi.


On Fri, Jul 12, 2013 at 6:44 AM, ashbb <ashbbb@gmail.com> wrote:

> Hi KC and folks,
>
> Sorry for my late reply.
> But I have to say the following:
>
> - Shoes TextBlock elements (i.e. para, title, etc.) doesn't support
> `click` option. Use `link` method.
>
> Try out this snippet:
>
>
>  Shoes.app do
>     alert_proc = Proc.new {alert "This Works!"}
>     para link("Click Me", &alert_proc)
>  end
>
> Regards,
> ashbb
>

Re: [shoes] :click => proc

From:
Tobias Pfeiffer
Date:
2013-07-11 @ 19:27
Hi there,

you just found a bug in Shoes3 and a missing feature in Shoes4 and 
thereby contributed to the development - thanks! =)

It probably won't get fixed in 3, but I just opened a ticket for Shoes4 
- if you wanna tackle it I can help you with it and sow you around a 
bit: https://github.com/shoes/shoes4/issues/331

Cheers,
Tobi

On Thu 11 Jul 2013 09:25:24 PM CEST, Douglas Allen wrote:
> What if you just call alert with click? Then try to pass the block if
> that works.
>
>
> On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com
> <mailto:iamkcerb@gmail.com>> wrote:
>
>     Hi all,
>
>     Based on the manual (http://shoesrb.com/manual/Styles.html) I
>     expect that the following should work:
>
>     Shoes.app do
>
>       alert_proc = Proc.new {alert "This Works!"}
>
>       para "Click Me", stroke: blue, click: alert_proc
>
>     end
>
>     But I don't see it working in Shoes3 or 4. When I try to run it I
>     get the para with the correct stroke formatting but it doesn't
>     respond to clicks. No error message though.
>
>     What am I missing?
>
>
>     Thanks,
>     KC Erb
>
>
>      "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] :click => proc

From:
Kc Erb
Date:
2013-07-11 @ 19:33
I wanna tackle it! But I don't know my way around github (I got lost at the
bit about cloning forks or something) but if you're willing to show me
around a bit I'm up for it.


On Thu, Jul 11, 2013 at 1:27 PM, Tobias Pfeiffer <
tobias.pfeiffer@student.hpi.uni-potsdam.de> wrote:

> Hi there,
>
> you just found a bug in Shoes3 and a missing feature in Shoes4 and
> thereby contributed to the development - thanks! =)
>
> It probably won't get fixed in 3, but I just opened a ticket for Shoes4
> - if you wanna tackle it I can help you with it and sow you around a
> bit: https://github.com/shoes/shoes4/issues/331
>
> Cheers,
> Tobi
>
> On Thu 11 Jul 2013 09:25:24 PM CEST, Douglas Allen wrote:
> > What if you just call alert with click? Then try to pass the block if
> > that works.
> >
> >
> > On Thu, Jul 11, 2013 at 2:11 PM, KC Erb <iamkcerb@gmail.com
> > <mailto:iamkcerb@gmail.com>> wrote:
> >
> >     Hi all,
> >
> >     Based on the manual (http://shoesrb.com/manual/Styles.html) I
> >     expect that the following should work:
> >
> >     Shoes.app do
> >
> >       alert_proc = Proc.new {alert "This Works!"}
> >
> >       para "Click Me", stroke: blue, click: alert_proc
> >
> >     end
> >
> >     But I don't see it working in Shoes3 or 4. When I try to run it I
> >     get the para with the correct stroke formatting but it doesn't
> >     respond to clicks. No error message though.
> >
> >     What am I missing?
> >
> >
> >     Thanks,
> >     KC Erb
> >
> >
> >      "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."
> >
> >
>



-- 
 "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."