librelist archives

« back to archive

Multiple questions on using Shoes

Multiple questions on using Shoes

From:
Felipe Sere
Date:
2014-07-15 @ 15:27
Hi everyone,

I am new to Shoes so please bare with me :).
The reason I am looking at shoes is because I need to build a GUI for a 
TicTacToe game I am writing…

Here are the questions I have so far:

- From what should I inherit to create my own “cell” (in TicTacToe-speek)?
I want to draw an image depending on whether the cell is :x, :o or :none, 
and that works, but I don’t know how to split it out in a class and use it
in my main Shoes.app

- Currently, I store my main stack in a variable, say @main_stack. When a 
move is made in TicTacToe, I do @main_stack.clear and I redraw the entire 
board. As part of the drawing, I had some click handlers like  so "stack 
do …end.click { …}”. I believe those get accumulated, since I see 
increasing numbers of mutations on my board. Does #clear destroy the 
entire subtree of widgets?

- How would you TDD a shoes app? I am not 100% clear on how to create my 
own classes and use them as “widgets?” in a shoes app

Oh, I am running Shoes4 pre1 on the latest JRuby.

Cheers and thanks for your help,
Felipe

Re: [shoes] Multiple questions on using Shoes

From:
Kc Erb
Date:
2014-07-15 @ 17:07
This is a great question Felipe and I've actually made a similar game.
Unfortunately I don't have permission right now from the game's original
creator to share it with the Shoes community just yet...

So, for fun, I decided to do a quick mock up of a tic tac toe game and
stick it in a gist <https://gist.github.com/KCErb/4178f9d89767a8312246>.

My file structure is:
app.rb - Home of the Shoes.app do end
lib/tic_tac_toe.rb - Home of TicTacToe module with basic attributes and
methods of the game
lib/cell.rb - Home of the cell widget.

Please play around with this and ask me questions. Widgets are my favorite
part of shoes!

Shoes on!
-KC




On Tue, Jul 15, 2014 at 9:27 AM, Felipe Sere <felipesere@gmail.com> wrote:

> Hi everyone,
>
> I am new to Shoes so please bare with me :).
> The reason I am looking at shoes is because I need to build a GUI for a
> TicTacToe game I am writing…
>
> Here are the questions I have so far:
>
> - From what should I inherit to create my own “cell” (in TicTacToe-speek)?
> I want to draw an image depending on whether the cell is :x, :o or :none,
> and that works, but I don’t know how to split it out in a class and use it
> in my main Shoes.app
>
> - Currently, I store my main stack in a variable, say @main_stack. When a
> move is made in TicTacToe, I do @main_stack.clear and I redraw the entire
> board. As part of the drawing, I had some click handlers like  so "stack do
> …end.click { …}”. I believe those get accumulated, since I see increasing
> numbers of mutations on my board. Does #clear destroy the entire subtree of
> widgets?
>
> - How would you TDD a shoes app? I am not 100% clear on how to create my
> own classes and use them as “widgets?” in a shoes app
>
> Oh, I am running Shoes4 pre1 on the latest JRuby.
>
> Cheers and thanks for your help,
> Felipe
>
>


-- 
 "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] Multiple questions on using Shoes

From:
Felipe Sere
Date:
2014-07-15 @ 17:17
Hi KC,

Thanks for sharing!
How does Shoes know that “cell top left” translates to Cell.new(top, 
left)? (in tic_tac_toe.rb line 26)

Felipe
On 15 Jul 2014, at 18:07, KC Erb <iamkcerb@gmail.com> wrote:

> This is a great question Felipe and I've actually made a similar game. 
Unfortunately I don't have permission right now from the game's original 
creator to share it with the Shoes community just yet...
> 
> So, for fun, I decided to do a quick mock up of a tic tac toe game and 
stick it in a gist. 
> 
> My file structure is:
> app.rb - Home of the Shoes.app do end
> lib/tic_tac_toe.rb - Home of TicTacToe module with basic attributes and 
methods of the game
> lib/cell.rb - Home of the cell widget.
> 
> Please play around with this and ask me questions. Widgets are my 
favorite part of shoes!
> 
> Shoes on!
> -KC
> 
> 
> 
> 
> On Tue, Jul 15, 2014 at 9:27 AM, Felipe Sere <felipesere@gmail.com> wrote:
> Hi everyone,
> 
> I am new to Shoes so please bare with me :).
> The reason I am looking at shoes is because I need to build a GUI for a 
TicTacToe game I am writing…
> 
> Here are the questions I have so far:
> 
> - From what should I inherit to create my own “cell” (in TicTacToe-speek)?
> I want to draw an image depending on whether the cell is :x, :o or 
:none, and that works, but I don’t know how to split it out in a class and
use it in my main Shoes.app
> 
> - Currently, I store my main stack in a variable, say @main_stack. When 
a move is made in TicTacToe, I do @main_stack.clear and I redraw the 
entire board. As part of the drawing, I had some click handlers like  so 
"stack do …end.click { …}”. I believe those get accumulated, since I see 
increasing numbers of mutations on my board. Does #clear destroy the 
entire subtree of widgets?
> 
> - How would you TDD a shoes app? I am not 100% clear on how to create my
own classes and use them as “widgets?” in a shoes app
> 
> Oh, I am running Shoes4 pre1 on the latest JRuby.
> 
> Cheers and thanks for your help,
> Felipe
> 
> 
> 
> 
> -- 
>  "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] Multiple questions on using Shoes

From:
Kc Erb
Date:
2014-07-15 @ 17:28
That's a big part of what widgets are all about! :)

When I create a widget, shoes basically adds it to the dsl. I think that is
the only "magic" method though. The rule is that shoes transforms your
class name into a snake_cased method.

For example in my other game I have LetterBox so the method becomes
letter_box.


On Tue, Jul 15, 2014 at 11:17 AM, Felipe Sere <felipesere@gmail.com> wrote:

> Hi KC,
>
> Thanks for sharing!
> How does Shoes know that “cell top left” translates to Cell.new(top,
> left)? (in tic_tac_toe.rb line 26)
>
> Felipe
> On 15 Jul 2014, at 18:07, KC Erb <iamkcerb@gmail.com> wrote:
>
> This is a great question Felipe and I've actually made a similar game.
> Unfortunately I don't have permission right now from the game's original
> creator to share it with the Shoes community just yet...
>
> So, for fun, I decided to do a quick mock up of a tic tac toe game and
> stick it in a gist <https://gist.github.com/KCErb/4178f9d89767a8312246>.
>
> My file structure is:
> app.rb - Home of the Shoes.app do end
> lib/tic_tac_toe.rb - Home of TicTacToe module with basic attributes and
> methods of the game
> lib/cell.rb - Home of the cell widget.
>
> Please play around with this and ask me questions. Widgets are my favorite
> part of shoes!
>
> Shoes on!
> -KC
>
>
>
>
> On Tue, Jul 15, 2014 at 9:27 AM, Felipe Sere <felipesere@gmail.com> wrote:
>
>> Hi everyone,
>>
>> I am new to Shoes so please bare with me :).
>> The reason I am looking at shoes is because I need to build a GUI for a
>> TicTacToe game I am writing…
>>
>> Here are the questions I have so far:
>>
>> - From what should I inherit to create my own “cell” (in TicTacToe-speek)?
>> I want to draw an image depending on whether the cell is :x, :o or :none,
>> and that works, but I don’t know how to split it out in a class and use it
>> in my main Shoes.app
>>
>> - Currently, I store my main stack in a variable, say @main_stack. When a
>> move is made in TicTacToe, I do @main_stack.clear and I redraw the entire
>> board. As part of the drawing, I had some click handlers like  so "stack do
>> …end.click { …}”. I believe those get accumulated, since I see increasing
>> numbers of mutations on my board. Does #clear destroy the entire subtree of
>> widgets?
>>
>> - How would you TDD a shoes app? I am not 100% clear on how to create my
>> own classes and use them as “widgets?” in a shoes app
>>
>> Oh, I am running Shoes4 pre1 on the latest JRuby.
>>
>> Cheers and thanks for your help,
>> Felipe
>>
>>
>
>
> --
>  "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] Multiple questions on using Shoes

From:
Kc Erb
Date:
2014-07-15 @ 17:35
Hey Cecil !
(if you're reading this)

Just wanted to let you know that I just tested out this app on the new 3.2
release and everything works, except the cells get placed incorrectly (I'm
on OSX 10.9).



On Tue, Jul 15, 2014 at 11:28 AM, KC Erb <iamkcerb@gmail.com> wrote:

> That's a big part of what widgets are all about! :)
>
> When I create a widget, shoes basically adds it to the dsl. I think that
> is the only "magic" method though. The rule is that shoes transforms your
> class name into a snake_cased method.
>
> For example in my other game I have LetterBox so the method becomes
> letter_box.
>
>
> On Tue, Jul 15, 2014 at 11:17 AM, Felipe Sere <felipesere@gmail.com>
> wrote:
>
>> Hi KC,
>>
>> Thanks for sharing!
>> How does Shoes know that “cell top left” translates to Cell.new(top,
>> left)? (in tic_tac_toe.rb line 26)
>>
>> Felipe
>> On 15 Jul 2014, at 18:07, KC Erb <iamkcerb@gmail.com> wrote:
>>
>> This is a great question Felipe and I've actually made a similar game.
>> Unfortunately I don't have permission right now from the game's original
>> creator to share it with the Shoes community just yet...
>>
>> So, for fun, I decided to do a quick mock up of a tic tac toe game and
>> stick it in a gist <https://gist.github.com/KCErb/4178f9d89767a8312246>.
>>
>> My file structure is:
>> app.rb - Home of the Shoes.app do end
>> lib/tic_tac_toe.rb - Home of TicTacToe module with basic attributes and
>> methods of the game
>> lib/cell.rb - Home of the cell widget.
>>
>> Please play around with this and ask me questions. Widgets are my
>> favorite part of shoes!
>>
>> Shoes on!
>> -KC
>>
>>
>>
>>
>> On Tue, Jul 15, 2014 at 9:27 AM, Felipe Sere <felipesere@gmail.com>
>> wrote:
>>
>>> Hi everyone,
>>>
>>> I am new to Shoes so please bare with me :).
>>> The reason I am looking at shoes is because I need to build a GUI for a
>>> TicTacToe game I am writing…
>>>
>>> Here are the questions I have so far:
>>>
>>> - From what should I inherit to create my own “cell” (in
>>> TicTacToe-speek)?
>>> I want to draw an image depending on whether the cell is :x, :o or
>>> :none, and that works, but I don’t know how to split it out in a class and
>>> use it in my main Shoes.app
>>>
>>> - Currently, I store my main stack in a variable, say @main_stack. When
>>> a move is made in TicTacToe, I do @main_stack.clear and I redraw the entire
>>> board. As part of the drawing, I had some click handlers like  so "stack do
>>> …end.click { …}”. I believe those get accumulated, since I see increasing
>>> numbers of mutations on my board. Does #clear destroy the entire subtree of
>>> widgets?
>>>
>>> - How would you TDD a shoes app? I am not 100% clear on how to create my
>>> own classes and use them as “widgets?” in a shoes app
>>>
>>> Oh, I am running Shoes4 pre1 on the latest JRuby.
>>>
>>> Cheers and thanks for your help,
>>> Felipe
>>>
>>>
>>
>>
>> --
>>  "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] Multiple questions on using Shoes

From:
Cecil Coupe
Date:
2014-07-15 @ 19:11
Indeed. It fails on Linux too which suggests it may also be a bug in all 
Shoes 3.x. I didn't modify anything in that part of Shoes 3. Thanks for 
reporting the problem with a test case simple enough for me to understand.

On 07/15/2014 11:35 AM, KC Erb wrote:
> Hey Cecil !
> (if you're reading this)
>
> Just wanted to let you know that I just tested out this app on the new 
> 3.2 release and everything works, except the cells get placed 
> incorrectly (I'm on OSX 10.9).
>
>

Re: [shoes] Multiple questions on using Shoes

From:
Cecil Coupe
Date:
2014-07-15 @ 19:27
If I comment out line 8 of cell.rb (a bare 'para') then it works fine on 
Linux and OSX. Does Shoes4 really need that bare para?

On 07/15/2014 11:35 AM, KC Erb wrote:
> Hey Cecil !
> (if you're reading this)
>
> Just wanted to let you know that I just tested out this app on the new 
> 3.2 release and everything works, except the cells get placed 
> incorrectly (I'm on OSX 10.9).
>

Re: [shoes] Multiple questions on using Shoes

From:
Kc Erb
Date:
2014-07-15 @ 19:34
That depends . . . in my quick sketch of the game I am just using a para
for placing X's (or O's) on the board via para.replace. So yes, it does
need it.

But I imagine that the real game could use an image, or something else


On Tue, Jul 15, 2014 at 1:27 PM, Cecil Coupe <ccoupe@cableone.net> wrote:

> If I comment out line 8 of cell.rb (a bare 'para') then it works fine on
> Linux and OSX. Does Shoes4 really need that bare para?
>
> On 07/15/2014 11:35 AM, KC Erb wrote:
> > Hey Cecil !
> > (if you're reading this)
> >
> > Just wanted to let you know that I just tested out this app on the new
> > 3.2 release and everything works, except the cells get placed
> > incorrectly (I'm on OSX 10.9).
> >
>
>


-- 
 "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] Multiple questions on using Shoes

From:
Cecil Coupe
Date:
2014-07-15 @ 20:10
I mean the line 8 of cell.rb of your gist.  Line 9 is where where you 
put the 'x' and 'o'. You do need that. Line 8 is just 'para' which 
causes the layout to go wrong.

On 07/15/2014 01:34 PM, KC Erb wrote:
> That depends . . . in my quick sketch of the game I am just using a 
> para for placing X's (or O's) on the board via para.replace. So yes, 
> it does need it.
>
> But I imagine that the real game could use an image, or something else
>
>
> On Tue, Jul 15, 2014 at 1:27 PM, Cecil Coupe <ccoupe@cableone.net 
> <mailto:ccoupe@cableone.net>> wrote:
>
>     If I comment out line 8 of cell.rb (a bare 'para') then it works
>     fine on
>     Linux and OSX. Does Shoes4 really need that bare para?
>
>     On 07/15/2014 11:35 AM, KC Erb wrote:
>     > Hey Cecil !
>     > (if you're reading this)
>     >
>     > Just wanted to let you know that I just tested out this app on
>     the new
>     > 3.2 release and everything works, except the cells get placed
>     > incorrectly (I'm on OSX 10.9).
>     >
>
>
>
>
> -- 
>  "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] Multiple questions on using Shoes

From:
Kc Erb
Date:
2014-07-15 @ 20:13
Oh whoops! I should have actually looked at the line you asked about
instead of just assuming. Yeah, that's a typo.

Good catch!


On Tue, Jul 15, 2014 at 2:10 PM, Cecil Coupe <ccoupe@cableone.net> wrote:

>  I mean the line 8 of cell.rb of your gist.  Line 9 is where where you put
> the 'x' and 'o'. You do need that. Line 8 is just 'para' which causes the
> layout to go wrong.
>
>
> On 07/15/2014 01:34 PM, KC Erb wrote:
>
> That depends . . . in my quick sketch of the game I am just using a para
> for placing X's (or O's) on the board via para.replace. So yes, it does
> need it.
>
>  But I imagine that the real game could use an image, or something else
>
>
> On Tue, Jul 15, 2014 at 1:27 PM, Cecil Coupe <ccoupe@cableone.net> wrote:
>
>> If I comment out line 8 of cell.rb (a bare 'para') then it works fine on
>> Linux and OSX. Does Shoes4 really need that bare para?
>>
>> On 07/15/2014 11:35 AM, KC Erb wrote:
>>  > Hey Cecil !
>> > (if you're reading this)
>> >
>> > Just wanted to let you know that I just tested out this app on the new
>> > 3.2 release and everything works, except the cells get placed
>> > incorrectly (I'm on OSX 10.9).
>> >
>>
>>
>
>
>  --
>  "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] Multiple questions on using Shoes

From:
Felipe Sere
Date:
2014-07-15 @ 20:49
Next question :-)

In your version of TTT, you do a letter.replace to change from “ “ to 
either X or O.
The way I have my code so far, I have a running TicTacToe::Board which 
contains the data structure and I have a AI that takes such a board and 
returns a new one with a move applied.

As such, I’d like to simplify my “Shoes view” to always redraw the current
board. for that, should I put it all in a top-level stack and do 
stack.clear ? or are the other techniques? I’d like to keep my Cells (the 
ones that are drawn) immutable to make it easier to reason about the code 
:)

Cheers and thanks so much so far! 
Felipe

On 15 Jul 2014, at 21:13, KC Erb <iamkcerb@gmail.com> wrote:

> Oh whoops! I should have actually looked at the line you asked about 
instead of just assuming. Yeah, that's a typo. 
> 
> Good catch!
> 
> 
> On Tue, Jul 15, 2014 at 2:10 PM, Cecil Coupe <ccoupe@cableone.net> wrote:
> I mean the line 8 of cell.rb of your gist.  Line 9 is where where you 
put the 'x' and 'o'. You do need that. Line 8 is just 'para' which causes 
the layout to go wrong.
> 
> 
> On 07/15/2014 01:34 PM, KC Erb wrote:
>> That depends . . . in my quick sketch of the game I am just using a 
para for placing X's (or O's) on the board via para.replace. So yes, it 
does need it.
>> 
>> But I imagine that the real game could use an image, or something else
>> 
>> 
>> On Tue, Jul 15, 2014 at 1:27 PM, Cecil Coupe <ccoupe@cableone.net> wrote:
>> If I comment out line 8 of cell.rb (a bare 'para') then it works fine on
>> Linux and OSX. Does Shoes4 really need that bare para?
>> 
>> On 07/15/2014 11:35 AM, KC Erb wrote:
>> > Hey Cecil !
>> > (if you're reading this)
>> >
>> > Just wanted to let you know that I just tested out this app on the new
>> > 3.2 release and everything works, except the cells get placed
>> > incorrectly (I'm on OSX 10.9).
>> >
>> 
>> 
>> 
>> 
>> -- 
>>  "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] Multiple questions on using Shoes

From:
Cecil Coupe
Date:
2014-07-16 @ 00:08
Felipe,

to answer your earlier question.  stack.clear will destroy the widgets 
in the stack so if you want to draw the entire  gameboard for each move, 
you'll have to recreate it for each move.

It's very hard to separate display from control logic (or MVC) with 
Shoes.  My advice is to try what like and if it doesn't work like you 
want, try something else.

--Cecil
On 07/15/2014 02:49 PM, Felipe Sere wrote:
> Next question :-)
>
> In your version of TTT, you do a letter.replace to change from “ “ to 
> either X or O.
> The way I have my code so far, I have a running TicTacToe::Board which 
> contains the data structure and I have a AI that takes such a board 
> and returns a new one with a move applied.
>
> As such, I’d like to simplify my “Shoes view” to always redraw the 
> current board. for that, should I put it all in a top-level stack and 
> do stack.clear ? or are the other techniques? I’d like to keep my 
> Cells (the ones that are drawn) immutable to make it easier to reason 
> about the code :)
>
> Cheers and thanks so much so far!
> Felipe
>
> On 15 Jul 2014, at 21:13, KC Erb <iamkcerb@gmail.com 
> <mailto:iam%0A%20kcerb@gmail.com>> wrote:
>
>> Oh whoops! I should have actually looked at the line you asked about 
>> instead of just assuming. Yeah, that's a typo.
>>
>> Good catch!
>>
>>
>> On Tue, Jul 15, 2014 at 2:10 PM, Cecil Coupe <ccoupe@cableone.net 
>> <mailto:ccoupe@cableone.net>> wrote:
>>
>>     I mean the line 8 of cell.rb of your gist.  Line 9 is where where
>>     you put the 'x' and 'o'. You do need that. Line 8 is just 'para'
>>     which causes the layout to go wrong.
>>
>>
>>     On 07/15/2014 01:34 PM, KC Erb wrote:
>>>     That depends . . . in my quick sketch of the game I am just
>>>     using a para for placing X's (or O's) on the board via
>>>     para.replace. So yes, it does need it.
>>>
>>>     But I imagine that the real game could use an image, or
>>>     something else
>>>
>>>
>>>     On Tue, Jul 15, 2014 at 1:27 PM, Cecil Coupe
>>>     <ccoupe@cableone.net <mailto:ccoupe@cableone.net>> wrote:
>>>
>>>         If I comment out line 8 of cell.rb (a bare 'para') then it
>>>         works fine on
>>>         Linux and OSX. Does Shoes4 really need that bare para?
>>>
>>>         On 07/15/2014 11:35 AM, KC Erb wrote:
>>>         > Hey Cecil !
>>>         > (if you're reading this)
>>>         >
>>>         > Just wanted to let you know that I just tested out this
>>>         app on the new
>>>         > 3.2 release and everything works, except the cells get placed
>>>         > incorrectly (I'm on OSX 10.9).
>>>         >
>>>
>>>
>>>
>>>
>>>     -- 
>>>      "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] Multiple questions on using Shoes

From:
Kc Erb
Date:
2014-07-16 @ 01:02
Hmm . . . I'm not sure I understand the question. It sounds like you're
doing what I would do (stick everything in a slot and use clear).

You asked about other techniques so I'll point out some other things that I
might try depending on what fits best:

1) In case you're not aware you can hand clear a block:

@main_stack.clear { draw_main_stack(data_structure) }

2) The other thing that comes to mind is that you mentioned keeping the
cells immutable; you could iterate through the new data structure and when
you find a difference just clear and redraw the new cell.

Just a thought. If that doesn't answer it feel free to let me know.




On Tue, Jul 15, 2014 at 2:49 PM, Felipe Sere <felipesere@gmail.com> wrote:

> Next question :-)
>
> In your version of TTT, you do a letter.replace to change from “ “ to
> either X or O.
> The way I have my code so far, I have a running TicTacToe::Board which
> contains the data structure and I have a AI that takes such a board and
> returns a new one with a move applied.
>
> As such, I’d like to simplify my “Shoes view” to always redraw the current
> board. for that, should I put it all in a top-level stack and do
> stack.clear ? or are the other techniques? I’d like to keep my Cells (the
> ones that are drawn) immutable to make it easier to reason about the code :)
>
> Cheers and thanks so much so far!
> Felipe
>
> On 15 Jul 2014, at 21:13, KC Erb <iamkcerb@gmail.com <iam+kcerb@gmail.com>>
> wrote:
>
> Oh whoops! I should have actually looked at the line you asked about
> instead of just assuming. Yeah, that's a typo.
>
> Good catch!
>
>
> On Tue, Jul 15, 2014 at 2:10 PM, Cecil Coupe <ccoupe@cableone.net> wrote:
>
>>  I mean the line 8 of cell.rb of your gist.  Line 9 is where where you
>> put the 'x' and 'o'. You do need that. Line 8 is just 'para' which causes
>> the layout to go wrong.
>>
>>
>> On 07/15/2014 01:34 PM, KC Erb wrote:
>>
>> That depends . . . in my quick sketch of the game I am just using a para
>> for placing X's (or O's) on the board via para.replace. So yes, it does
>> need it.
>>
>>  But I imagine that the real game could use an image, or something else
>>
>>
>> On Tue, Jul 15, 2014 at 1:27 PM, Cecil Coupe <ccoupe@cableone.net> wrote:
>>
>>> If I comment out line 8 of cell.rb (a bare 'para') then it works fine on
>>> Linux and OSX. Does Shoes4 really need that bare para?
>>>
>>> On 07/15/2014 11:35 AM, KC Erb wrote:
>>>  > Hey Cecil !
>>> > (if you're reading this)
>>> >
>>> > Just wanted to let you know that I just tested out this app on the new
>>> > 3.2 release and everything works, except the cells get placed
>>> > incorrectly (I'm on OSX 10.9).
>>> >
>>>
>>>
>>
>>
>>  --
>>  "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] Multiple questions on using Shoes

From:
Felipe Sere
Date:
2014-07-16 @ 08:00
Yeah, re-reading my last mail I see now that it sounds confusing…

I have my board (model) and an AI that can manipulate the board. 
Your first option with 
    @main_stack.clear { draw_main_stack(data_structure) } 
should do just fine :)

How would you go about testing a Shoes app? Are there any test doubles 
with methods that can assert on the content and things…?

Cheers,
Felipe


On 16 Jul 2014, at 02:02, KC Erb <iamkcerb@gmail.com> wrote:

> Hmm . . . I'm not sure I understand the question. It sounds like you're 
doing what I would do (stick everything in a slot and use clear).
> 
> You asked about other techniques so I'll point out some other things 
that I might try depending on what fits best:
> 
> 1) In case you're not aware you can hand clear a block: 
> 
> @main_stack.clear { draw_main_stack(data_structure) }
> 
> 2) The other thing that comes to mind is that you mentioned keeping the 
cells immutable; you could iterate through the new data structure and when
you find a difference just clear and redraw the new cell.
> 
> Just a thought. If that doesn't answer it feel free to let me know.
> 
> 
> 
> 
> On Tue, Jul 15, 2014 at 2:49 PM, Felipe Sere <felipesere@gmail.com> wrote:
> Next question :-)
> 
> In your version of TTT, you do a letter.replace to change from “ “ to 
either X or O.
> The way I have my code so far, I have a running TicTacToe::Board which 
contains the data structure and I have a AI that takes such a board and 
returns a new one with a move applied.
> 
> As such, I’d like to simplify my “Shoes view” to always redraw the 
current board. for that, should I put it all in a top-level stack and do 
stack.clear ? or are the other techniques? I’d like to keep my Cells (the 
ones that are drawn) immutable to make it easier to reason about the code 
:)
> 
> Cheers and thanks so much so far! 
> Felipe
> 
> On 15 Jul 2014, at 21:13, KC Erb <iamkcerb@gmail.com> wrote:
> 
>> Oh whoops! I should have actually looked at the line you asked about 
instead of just assuming. Yeah, that's a typo. 
>> 
>> Good catch!
>> 
>> 
>> On Tue, Jul 15, 2014 at 2:10 PM, Cecil Coupe <ccoupe@cableone.net> wrote:
>> I mean the line 8 of cell.rb of your gist.  Line 9 is where where you 
put the 'x' and 'o'. You do need that. Line 8 is just 'para' which causes 
the layout to go wrong.
>> 
>> 
>> On 07/15/2014 01:34 PM, KC Erb wrote:
>>> That depends . . . in my quick sketch of the game I am just using a 
para for placing X's (or O's) on the board via para.replace. So yes, it 
does need it.
>>> 
>>> But I imagine that the real game could use an image, or something else
>>> 
>>> 
>>> On Tue, Jul 15, 2014 at 1:27 PM, Cecil Coupe <ccoupe@cableone.net> wrote:
>>> If I comment out line 8 of cell.rb (a bare 'para') then it works fine on
>>> Linux and OSX. Does Shoes4 really need that bare para?
>>> 
>>> On 07/15/2014 11:35 AM, KC Erb wrote:
>>> > Hey Cecil !
>>> > (if you're reading this)
>>> >
>>> > Just wanted to let you know that I just tested out this app on the new
>>> > 3.2 release and everything works, except the cells get placed
>>> > incorrectly (I'm on OSX 10.9).
>>> >
>>> 
>>> 
>>> 
>>> 
>>> -- 
>>>  "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] Multiple questions on using Shoes

From:
Tobias Pfeiffer
Date:
2014-07-16 @ 10:27
Testing Shoes is hard. I still want to write a mock back-end (some
day...) that allows for better testing.

In the mean time I suggest that you put all logic in models that don't
use any shoes methods (which is good any way). Then use those in the
views. Only test the models.

Sorry I am not aware of a better solution at the moment.

Tobi

On 07/16/2014 10:00 AM, Felipe Sere wrote:
> Yeah, re-reading my last mail I see now that it sounds confusing…
> 
> I have my board (model) and an AI that can manipulate the board. 
> Your first option with 
>     @main_stack.clear { draw_main_stack(data_structure) } 
> should do just fine :)
> 
> How would you go about testing a Shoes app? Are there any test doubles
> with methods that can assert on the content and /things…?/
> /
> /
> Cheers,
> Felipe
> 
> 
> On 16 Jul 2014, at 02:02, KC Erb <iamkcerb@gmail.com
> <mailto:iamkcerb@gmail.com>> wrote:
> 
>> Hmm . . . I'm not sure I underst and the question. It sounds like
>> you're doing what I would do (stick everything in a slot and use clear).
>>
>> You asked about other techniques so I'll point out some other things
>> that I might try depending on what fits best:
>>
>> 1) In case you're not aware you can hand clear a block: 
>>
>> @main_stack.clear { draw_main_stack(data_structure) }
>>
>> 2) The other thing that comes to mind is that you mentioned keeping
>> the cells immutable; you could iterate through the new data structure
>> and when you find a difference just clear and redraw the new cell.
>>
>> Just a thought. If that doesn't answer it feel free to let me know.
>>
>>
>>
>>
>> On Tue, Jul 15, 2014 at 2:49 PM, Felipe Sere <felipesere@gmail.com
>> <mailto:felipesere@gmail.com>> wrote:
>>
>>     Next question :-)
>>
>>     In your version of TTT, you do a letter.replace to change from “ “
>>     to either X or O.
>>     The way I have my code so far, I have a running TicTacToe::Board
>>     which contains the data structure and I have a AI that takes such
>>     a board and returns a new one with a move applied.
>>
>>     As such, I’d like to simplify my “Shoes view” to always redraw the
>>     current board. for that, should I put it all in a top-level stack
>>     and do stack.clear ? or are the other techniques? I’d like to keep
>>     my Cells (the ones that are drawn) immutable to make it easier to
>>     reason about the code :)
>>
>>     Cheers and thanks so much so far! 
>>     Felipe
>>
>>     On 15 Jul 2014, at 21:13, KC Erb <iamkcerb@gmail.com
>>     <mailto:iam+kcerb@gmail.com>> wrote:
>>
>>>     Oh whoops! I should have actually looked at the line you asked
>>>     about instead of just assuming. Yeah, that's a typo. 
>>>
>>>     Good catch!
>>>
>>>
>>>     On Tue, Jul 15, 2014 at 2:10 PM, Cecil Coupe <ccoupe@cableone.net
>>>     <mailto:ccoupe@cableone.net>> wrote:
>>>
>>>         I mean the line 8 of cell.rb of your gist.  Line 9 is where
>>>         where you put the 'x' and 'o'. You do need that. Line 8 is
>>>         just 'para' which causes the layout to go wrong.
>>>
>>>
>>>         On 07/15/2014 01:34 PM, KC Erb wrote:
>>>>         That depends . . . in my quick sketch of the game I am just
>>>>         using a para for placing X's (or O's) on the board via
>>>>         para.replace. So yes, it does need it.
>>>>
>>>>         But I imagine that the real game could use an image, or
>>>>         something else
>>>>
>>>>
>>>>         On Tue, Jul 15, 2014 at 1:27 PM, Cecil Coupe
>>>>         <ccoupe@cableone.net <mailto:ccoupe@cableone.net>> wrote:
>>>>
>>>>             If I comment out line 8 of cell.rb (a bare 'para') then
>>>>             it works fine on
>>>>             Linux and OSX. Does Shoes4 really need that bare para?
>>>>
>>>>             On 07/15/2014 11:35 AM, KC Erb wrote:
>>>>             > Hey Cecil !
>>>>             > (if you're reading this)
>>>>             >
>>>>             > Just wanted to let you know that I just tested out
>>>>             this app on the new
>>>>             > 3.2 release and everything works, except the cells get
>>>>             placed
>>>>             > incorrectly (I'm on OSX 10.9).
>>>>             >
>>>>
>>>>
>>>>
>>>>
>>>>         -- 
>>>>          "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."
> 

-- 
www.pragtob.info

Re: [shoes] Multiple questions on using Shoes

From:
Felipe Sere
Date:
2014-07-16 @ 10:54
Thanks Tobias,

Do you have any ideas how testing for Shoes could look like? I might get 
time to work on something, but I would definitely need some guidance :)

On a different note:
How does Shoes handle the fact that one S::Widget uses another S:Widget?
I have a BoardView which uses my Cell.
I expected the call to “cells” to just work… but I am getting an 
“undefined method `cell’ for #BoardView<….>”.

Might it be an ordering issue? I looked at the source of S::Widget, but I 
am pretty sure that inherited gets called pretty early, right? So the 
method  “cell” should be available on Shoes::App, right?

I can post my code if that is necessary.

Felipe

On 16 Jul 2014, at 11:27, Tobias Pfeiffer 
<tobias.pfeiffer@student.hpi.uni-potsdam.de> wrote:

> Testing Shoes is hard. I still want to write a mock back-end (some
> day...) that allows for better testing.
> 
> In the mean time I suggest that you put all logic in models that don't
> use any shoes methods (which is good any way). Then use those in the
> views. Only test the models.
> 
> Sorry I am not aware of a better solution at the moment.
> 
> Tobi
> 
> On 07/16/2014 10:00 AM, Felipe Sere wrote:
>> Yeah, re-reading my last mail I see now that it sounds confusing…
>> 
>> I have my board (model) and an AI that can manipulate the board. 
>> Your first option with 
>>    @main_stack.clear { draw_main_stack(data_structure) } 
>> should do just fine :)
>> 
>> How would you go about testing a Shoes app? Are there any test doubles
>> with methods that can assert on the content and /things…?/
>> /
>> /
>> Cheers,
>> Felipe
>> 
>> 
>> On 16 Jul 2014, at 02:02, KC Erb <iamkcerb@gmail.com
>> <mailto:iamkcerb@gmail.com>> wrote:
>> 
>>> Hmm . . . I'm not sure I underst and the question. It sounds like
>>> you're doing what I would do (stick everything in a slot and use clear).
>>> 
>>> You asked about other techniques so I'll point out some other things
>>> that I might try depending on what fits best:
>>> 
>>> 1) In case you're not aware you can hand clear a block: 
>>> 
>>> @main_stack.clear { draw_main_stack(data_structure) }
>>> 
>>> 2) The other thing that comes to mind is that you mentioned keeping
>>> the cells immutable; you could iterate through the new data structure
>>> and when you find a difference just clear and redraw the new cell.
>>> 
>>> Just a thought. If that doesn't answer it feel free to let me know.
>>> 
>>> 
>>> 
>>> 
>>> On Tue, Jul 15, 2014 at 2:49 PM, Felipe Sere <felipesere@gmail.com
>>> <mailto:felipesere@gmail.com>> wrote:
>>> 
>>>    Next question :-)
>>> 
>>>    In your version of TTT, you do a letter.replace to change from “ “
>>>    to either X or O.
>>>    The way I have my code so far, I have a running TicTacToe::Board
>>>    which contains the data structure and I have a AI that takes such
>>>    a board and returns a new one with a move applied.
>>> 
>>>    As such, I’d like to simplify my “Shoes view” to always redraw the
>>>    current board. for that, should I put it all in a top-level stack
>>>    and do stack.clear ? or are the other techniques? I’d like to keep
>>>    my Cells (the ones that are drawn) immutable to make it easier to
>>>    reason about the code :)
>>> 
>>>    Cheers and thanks so much so far! 
>>>    Felipe
>>> 
>>>    On 15 Jul 2014, at 21:13, KC Erb <iamkcerb@gmail.com
>>>    <mailto:iam+kcerb@gmail.com>> wrote:
>>> 
>>>>    Oh whoops! I should have actually looked at the line you asked
>>>>    about instead of just assuming. Yeah, that's a typo. 
>>>> 
>>>>    Good catch!
>>>> 
>>>> 
>>>>    On Tue, Jul 15, 2014 at 2:10 PM, Cecil Coupe <ccoupe@cableone.net
>>>>    <mailto:ccoupe@cableone.net>> wrote:
>>>> 
>>>>        I mean the line 8 of cell.rb of your gist.  Line 9 is where
>>>>        where you put the 'x' and 'o'. You do need that. Line 8 is
>>>>        just 'para' which causes the layout to go wrong.
>>>> 
>>>> 
>>>>        On 07/15/2014 01:34 PM, KC Erb wrote:
>>>>>        That depends . . . in my quick sketch of the game I am just
>>>>>        using a para for placing X's (or O's) on the board via
>>>>>        para.replace. So yes, it does need it.
>>>>> 
>>>>>        But I imagine that the real game could use an image, or
>>>>>        something else
>>>>> 
>>>>> 
>>>>>        On Tue, Jul 15, 2014 at 1:27 PM, Cecil Coupe
>>>>>        <ccoupe@cableone.net <mailto:ccoupe@cableone.net>> wrote:
>>>>> 
>>>>>            If I comment out line 8 of cell.rb (a bare 'para') then
>>>>>            it works fine on
>>>>>            Linux and OSX. Does Shoes4 really need that bare para?
>>>>> 
>>>>>            On 07/15/2014 11:35 AM, KC Erb wrote:
>>>>>> Hey Cecil !
>>>>>> (if you're reading this)
>>>>>> 
>>>>>> Just wanted to let you know that I just tested out
>>>>>            this app on the new
>>>>>> 3.2 release and everything works, except the cells get
>>>>>            placed
>>>>>> incorrectly (I'm on OSX 10.9).
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>        -- 
>>>>>         "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."
>> 
> 
> -- 
> www.pragtob.info

Re: [shoes] Multiple questions on using Shoes

From:
Felipe Sere
Date:
2014-07-16 @ 11:01
Annnd I figured that bit out…

I had to call app.cell( …parameters…)
I guess the problem is that the method “cell” is not being delegated to as only 
*Shoes::App::DELEGATE_METHODS
 are being delegated. Maybe a
Shoes::App::DELEGATE_METHODS << dsl_name 
would help in this case? It would certainly add new widgets names to the 
methods which would be delegated, right?

Felipe


On 16 Jul 2014, at 11:54, Felipe Sere <felipesere@gmail.com> wrote:

> Thanks Tobias,
> 
> Do you have any ideas how testing for Shoes could look like? I might get
time to work on something, but I would definitely need some guidance :)
> 
> On a different note:
> How does Shoes handle the fact that one S::Widget uses another S:Widget?
> I have a BoardView which uses my Cell.
> I expected the call to “cells” to just work… but I am getting an 
“undefined method `cell’ for #BoardView<….>”.
> 
> Might it be an ordering issue? I looked at the source of S::Widget, but 
I am pretty sure that inherited gets called pretty early, right? So the 
method  “cell” should be available on Shoes::App, right?
> 
> I can post my code if that is necessary.
> 
> Felipe
> 
> On 16 Jul 2014, at 11:27, Tobias Pfeiffer 
<tobias.pfeiffer@student.hpi.uni-potsdam.de> wrote:
> 
>> Testing Shoes is hard. I still want to write a mock back-end (some
>> day...) that allows for better testing.
>> 
>> In the mean time I suggest that you put all logic in models that don't
>> use any shoes methods (which is good any way). Then use those in the
>> views. Only test the models.
>> 
>> Sorry I am not aware of a better solution at the moment.
>> 
>> Tobi
>> 
>> On 07/16/2014 10:00 AM, Felipe Sere wrote:
>>> Yeah, re-reading my last mail I see now that it sounds confusing…
>>> 
>>> I have my board (model) and an AI that can manipulate the board. 
>>> Your first option with 
>>>    @main_stack.clear { draw_main_stack(data_structure) } 
>>> should do just fine :)
>>> 
>>> How would you go about testing a Shoes app? Are there any test doubles
>>> with methods that can assert on the content and /things…?/
>>> /
>>> /
>>> Cheers,
>>> Felipe
>>> 
>>> 
>>> On 16 Jul 2014, at 02:02, KC Erb <iamkcerb@gmail.com
>>> <mailto:iamkcerb@gmail.com>> wrote:
>>> 
>>>> Hmm . . . I'm not sure I underst and the question. It sounds like
>>>> you're doing what I would do (stick everything in a slot and use clear).
>>>> 
>>>> You asked about other techniques so I'll point out some other things
>>>> that I might try depending on what fits best:
>>>> 
>>>> 1) In case you're not aware you can hand clear a block: 
>>>> 
>>>> @main_stack.clear { draw_main_stack(data_structure) }
>>>> 
>>>> 2) The other thing that comes to mind is that you mentioned keeping
>>>> the cells immutable; you could iterate through the new data structure
>>>> and when you find a difference just clear and redraw the new cell.
>>>> 
>>>> Just a thought. If that doesn't answer it feel free to let me know.
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On Tue, Jul 15, 2014 at 2:49 PM, Felipe Sere <felipesere@gmail.com
>>>> <mailto:felipesere@gmail.com>> wrote:
>>>> 
>>>>    Next question :-)
>>>> 
>>>>    In your version of TTT, you do a letter.replace to change from “ “
>>>>    to either X or O.
>>>>    The way I have my code so far, I have a running TicTacToe::Board
>>>>    which contains the data structure and I have a AI that takes such
>>>>    a board and returns a new one with a move applied.
>>>> 
>>>>    As such, I’d like to simplify my “Shoes view” to always redraw the
>>>>    current board. for that, should I put it all in a top-level stack
>>>>    and do stack.clear ? or are the other techniques? I’d like to keep
>>>>    my Cells (the ones that are drawn) immutable to make it easier to
>>>>    reason about the code :)
>>>> 
>>>>    Cheers and thanks so much so far! 
>>>>    Felipe
>>>> 
>>>>    On 15 Jul 2014, at 21:13, KC Erb <iamkcerb@gmail.com
>>>>    <mailto:iam+kcerb@gmail.com>> wrote:
>>>> 
>>>>>    Oh whoops! I should have actually looked at the line you asked
>>>>>    about instead of just assuming. Yeah, that's a typo. 
>>>>> 
>>>>>    Good catch!
>>>>> 
>>>>> 
>>>>>    On Tue, Jul 15, 2014 at 2:10 PM, Cecil Coupe <ccoupe@cableone.net
>>>>>    <mailto:ccoupe@cableone.net>> wrote:
>>>>> 
>>>>>        I mean the line 8 of cell.rb of your gist.  Line 9 is where
>>>>>        where you put the 'x' and 'o'. You do need that. Line 8 is
>>>>>        just 'para' which causes the layout to go wrong.
>>>>> 
>>>>> 
>>>>>        On 07/15/2014 01:34 PM, KC Erb wrote:
>>>>>>        That depends . . . in my quick sketch of the game I am just
>>>>>>        using a para for placing X's (or O's) on the board via
>>>>>>        para.replace. So yes, it does need it.
>>>>>> 
>>>>>>        But I imagine that the real game could use an image, or
>>>>>>        something else
>>>>>> 
>>>>>> 
>>>>>>        On Tue, Jul 15, 2014 at 1:27 PM, Cecil Coupe
>>>>>>        <ccoupe@cableone.net <mailto:ccoupe@cableone.net>> wrote:
>>>>>> 
>>>>>>            If I comment out line 8 of cell.rb (a bare 'para') then
>>>>>>            it works fine on
>>>>>>            Linux and OSX. Does Shoes4 really need that bare para?
>>>>>> 
>>>>>>            On 07/15/2014 11:35 AM, KC Erb wrote:
>>>>>>> Hey Cecil !
>>>>>>> (if you're reading this)
>>>>>>> 
>>>>>>> Just wanted to let you know that I just tested out
>>>>>>            this app on the new
>>>>>>> 3.2 release and everything works, except the cells get
>>>>>>            placed
>>>>>>> incorrectly (I'm on OSX 10.9).
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>        -- 
>>>>>>         "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."
>>> 
>> 
>> -- 
>> www.pragtob.info
> 

Re: [shoes] Multiple questions on using Shoes

From:
Tobias Pfeiffer
Date:
2014-07-16 @ 15:56
Hi Felipe,

thank you for reporting the issue. I filed it as #787
https://github.com/shoes/shoes4/issues/787

As for how testing would work... in my eyes that would be a whole
separate `backend` for shoes that instead of drawing would create an
internal structure of the application which one could query afterwards.
I have no time to go into further detail right now - my Master's thesis
is angrily waiting for me ;)

Cheers + thanks,
Tobi

On 07/16/2014 01:01 PM, Felipe Sere wrote:
> Annnd I figured that bit out…
> 
> I had to call app.cell( …parameters…)
> I guess the problem is that the method “cell” is not being delegated to
> as only 
> *Shoes::App::DELEGATE_METHODS
>  are being delegated. Maybe a
> Shoes::App::DELEGATE_METHODS << dsl_name 
> would help in this case? It would certainly add new widgets names to the
> methods which would be delegated, right?
> 
> Felipe
> 
> 
> On 16 Jul 2014, at 11:54, Felipe Sere <felipesere@gmail.com
> <mailto:felipesere@ gmail.co m>> wrote:
> 
>> Thanks Tobias,
>>
>> Do you have any ideas how testing for Shoes could look like? I might
>> get time to work on something, but I would definitely need some
>> guidance :)
>>
>> On a different note:
>> How does Shoes handle the fact that one S::Widget uses another S:Widget?
>> I have a BoardView which uses my Cell.
>> I expected the call to “cells” to just work… but I am getting
>> an /“undefined method `cell’ for #BoardView<….>”./
>>
>> Might it be an ordering issue? I looked at the source of S::Widget,
>> but I am pretty sure that *inherited *gets called pretty early, right?
>> So the method   “cell� �� should be available on Shoes::App, right?
>>
>> I can post my code if that is necessary.
>>
>> Felipe
>>
>> On 16 Jul 2014, at 11:27, Tobias Pfeiffer
>> <tobias.pfeiffer@student.hpi.uni-potsdam.de
>> <mailto:tobias.pfeiffer@student.hpi.uni-potsdam.de>> wrote:
>>
>>> Testing Shoes is hard. I still want to write a mock back-end (some
>>> day...) that allows for better testing.
>>>
>>> In the mean time I suggest that you put all logic in models that don't
>>> use any shoes methods (which is good any way). Then use those in the
>>> views. Only test the models.*
>>> So rry I am not aware of a better solution at the moment.
>>>
>>> Tobi
>>>
>>> On 07/16/2014 10:00 AM, Felipe Sere wrote:
>>>> Yeah, re-reading my last mail I see now that it sounds confusing…
>>>>
>>>> I have my board (model) and an AI that can manipulate the board. 
>>>> Your first option with 
>>>>    @main_stack.clear { draw_main_stack(data_structure) } 
>>>> should do just fine :)
>>>>
>>>> How would you go about testing a Shoes app? Are there any test doubles
>>>> with methods that can assert on the content and /things…?/
>>>> /
>>>> /
>>>> Cheers,
>>>> Felipe
>>>>
>>>>
>>>> On 16 Jul 2014, at 02:02, KC Erb <iamkcerb@gmail.com
>>>> <mailto:iamkcerb@gmail.com>
>>>> <mailto:iamkcerb@gmail.com>> wrote:
>>>>
>>>>> Hmm . . . I'm not sure I underst and the question. It sounds like
>>>>> you're doing what I would do (stick everything in a slot and use
>>>>> clear).
>>>>>
>>>>> You asked about other techniques so I'll point out some other things
>>>>> that I might try depending on what fits best:
>>>>>
>>>>> 1) In case you're not aware you can hand clear a block: 
>>>>>
>>>>> @main_stack.clear { draw_main_stack(data_structure) }
>>>>>
>>>>> 2) The other thing that comes to mind is that you mentioned keeping
>>>>> the cells immutable; you could iterate through the new data structure
>>>>> and when you find a difference just clear and redraw the new cell.
>>>>>
>>>>> Just a thought. If that doesn't answer it feel free to let me know.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Jul 15, 2014 at 2:49 PM, Felipe Sere <felipesere@gmail.com
>>>>> <mailto:felipesere@gmail.com>
>>>>> <mailto:felipesere@gmail.com>> wrote:
>>>>>
>>>>>    Next question :-)
>>>>>
>>>>>    In yo ur versi on of TTT, you do a letter.replace to change from “ “
>>>>>    to either X or O.
>>>>>    The way I have my code so far, I have a running TicTacToe::Board
>>>>>    which contains the data structure and I have a AI that takes such
>>>>>    a board and returns a new one with a move applied.
>>>>>
>>>>>    As such, I’d like to simplify my “Shoes view” to always redraw the
>>>>>    current board. for that, should I put it all in a top-level stack
>>>>>    and do stack.clear ? or are the other techniques? I’d like to keep
>>>>>    my Cells (the ones that are drawn) immutable to make it easier to
>>>>>    reason about the code :)
>>>>>
>>>>>    Cheers and thanks so much so far! 
>>>>>    Felipe
>>>>>
>>>>>    On 15 Jul 2014, at 21:13, KC Erb <iamkc erb@gmai l.com
>>>>> <mailto:iamkcerb@gmail.com>
>>>>>    <mailto:iam+kcerb@gmail.com>> wrote:
>>>>>
>>>>>>    Oh whoops! I should have actually looked at the line you asked
>>>>>>    about instead of just assuming. Yeah, that's a typo. 
>>>>>>
>>>>>>    Good catch!
>>>>>>
>>>>>>
>>>>>>    On Tue, Jul 15, 2014 at 2:10 PM, Cecil Coupe
>>>>>> <ccoupe@cableone.net <mailto:ccoupe@cableone.net>
>>>>>>    <mailto:ccoupe@cableone.net>> wrote:
>>>>>>
>>>>>>        I mean the line 8 of cell.rb of your gist.  Line 9 is where
>>>>>>        where you put the 'x' and 'o'. You do need that. Line 8 is
>>>>>>        just 'para' which causes the layout to go wrong.
>>>>>>
>>>>>>
>>>>>>       ; & nbsp;On 07/15/2014 01:34 PM, KC Erb wrote:
>>>>>>>        That depends . . . in my quick sketch of the game I am just
>>>>>>>        using a para for placing X's (or O's) on the board via
>>>>>>>        para.replace. So yes, it does need it.
>>>>>>>
>>>>>>>        But I imagine that the real game could use an image, or
>>>>>>>        something else
>>>>>>>
>>>>>>>
>>>>>>>        On Tue, Jul 15, 2014 at 1:27 PM, Cecil Coupe
>>>>>>>        <ccoupe@cableone.net
>>>>>>> <mailto:ccoupe@cableone.net> <mailto:ccoupe@cableone.net>> wrote:
>>>>>>>
>>>>>>>            If I comment out line 8 of cell.rb (a bare 'para') t hen
>>>>>>> & nbsp;          it works fine on
>>>>>>>            Linux and OSX. Does Shoes4 really need that bare para?
>>>>>>>
>>>>>>>            On 07/15/2014 11:35 AM, KC Erb wrote:
>>>>>>>> Hey Cecil !
>>>>>>>> (if you're reading this)
>>>>>>>>
>>>>>>>> Just wanted to let you know that I just tested out
>>>>>>>            this app on the new
>>>>>>>> 3.2 release and everything works, except the cells get
>>>>>>>            placed
>>>>>>>> incorrectly (I'm on OSX 10.9).
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>        -- 
>>>>>>>         "If there is an exception to every rule, th en 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."
>>>>
>>>
>>> -- 
>>> www.pragtob.info <http://www.pragtob.info/>*
>> *
>> *
> *
> *
> **

-- 
www.pragtob.info

Re: [shoes] Multiple questions on using Shoes

From:
Kc Erb
Date:
2014-07-16 @ 16:04
Also I can't really help on the testing because I just plain don't know.
I'm new to programming in general  :)

(I spent the morning learning about MVC after reading Tobi's response and
scratching my head.)


On Wed, Jul 16, 2014 at 9:56 AM, Tobias Pfeiffer <
tobias.pfeiffer@student.hpi.uni-potsdam.de> wrote:

> Hi Felipe,
>
> thank you for reporting the issue. I filed it as #787
> https://github.com/shoes/shoes4/issues/787
>
> As for how testing would work... in my eyes that would be a whole
> separate `backend` for shoes that instead of drawing would create an
> internal structure of the application which one could query afterwards.
> I have no time to go into further detail right now - my Master's thesis
> is angrily waiting for me ;)
>
> Cheers + thanks,
> Tobi
>
> On 07/16/2014 01:01 PM, Felipe Sere wrote:
> > Annnd I figured that bit out…
> >
> > I had to call app.cell( …parameters…)
> > I guess the problem is that the method “cell” is not being delegated to
> > as only
> > *Shoes::App::DELEGATE_METHODS
> >  are being delegated. Maybe a
> > Shoes::App::DELEGATE_METHODS << dsl_name
> > would help in this case? It would certainly add new widgets names to the
> > methods which would be delegated, right?
> >
> > Felipe
> >
> >
> > On 16 Jul 2014, at 11:54, Felipe Sere <felipesere@gmail.com
> > <mailto:felipesere@ gmail.co m>> wrote:
> >
> >> Thanks Tobias,
> >>
> >> Do you have any ideas how testing for Shoes could look like? I might
> >> get time to work on something, but I would definitely need some
> >> guidance :)
> >>
> >> On a different note:
> >> How does Shoes handle the fact that one S::Widget uses another S:Widget?
> >> I have a BoardView which uses my Cell.
> >> I expected the call to “cells” to just work… but I am getting
> >> an /“undefined method `cell’ for #BoardView<….>”./
> >>
> >> Might it be an ordering issue? I looked at the source of S::Widget,
> >> but I am pretty sure that *inherited *gets called pretty early, right?
> >> So the method   “cell� �� should be available on Shoes::App, right?
> >>
> >> I can post my code if that is necessary.
> >>
> >> Felipe
> >>
> >> On 16 Jul 2014, at 11:27, Tobias Pfeiffer
> >> <tobias.pfeiffer@student.hpi.uni-potsdam.de
> >> <mailto:tobias.pfeiffer@student.hpi.uni-potsdam.de>> wrote:
> >>
> >>> Testing Shoes is hard. I still want to write a mock back-end (some
> >>> day...) that allows for better testing.
> >>>
> >>> In the mean time I suggest that you put all logic in models that don't
> >>> use any shoes methods (which is good any way). Then use those in the
> >>> views. Only test the models.*
> >>> So rry I am not aware of a better solution at the moment.
> >>>
> >>> Tobi
> >>>
> >>> On 07/16/2014 10:00 AM, Felipe Sere wrote:
> >>>> Yeah, re-reading my last mail I see now that it sounds confusing…
> >>>>
> >>>> I have my board (model) and an AI that can manipulate the board.
> >>>> Your first option with
> >>>>    @main_stack.clear { draw_main_stack(data_structure) }
> >>>> should do just fine :)
> >>>>
> >>>> How would you go about testing a Shoes app? Are there any test doubles
> >>>> with methods that can assert on the content and /things…?/
> >>>> /
> >>>> /
> >>>> Cheers,
> >>>> Felipe
> >>>>
> >>>>
> >>>> On 16 Jul 2014, at 02:02, KC Erb <iamkcerb@gmail.com
> >>>> <mailto:iamkcerb@gmail.com>
> >>>> <mailto:iamkcerb@gmail.com>> wrote:
> >>>>
> >>>>> Hmm . . . I'm not sure I underst and the question. It sounds like
> >>>>> you're doing what I would do (stick everything in a slot and use
> >>>>> clear).
> >>>>>
> >>>>> You asked about other techniques so I'll point out some other things
> >>>>> that I might try depending on what fits best:
> >>>>>
> >>>>> 1) In case you're not aware you can hand clear a block:
> >>>>>
> >>>>> @main_stack.clear { draw_main_stack(data_structure) }
> >>>>>
> >>>>> 2) The other thing that comes to mind is that you mentioned keeping
> >>>>> the cells immutable; you could iterate through the new data structure
> >>>>> and when you find a difference just clear and redraw the new cell.
> >>>>>
> >>>>> Just a thought. If that doesn't answer it feel free to let me know.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Tue, Jul 15, 2014 at 2:49 PM, Felipe Sere <felipesere@gmail.com
> >>>>> <mailto:felipesere@gmail.com>
> >>>>> <mailto:felipesere@gmail.com>> wrote:
> >>>>>
> >>>>>    Next question :-)
> >>>>>
> >>>>>    In yo ur versi on of TTT, you do a letter.replace to change from
> “ “
> >>>>>    to either X or O.
> >>>>>    The way I have my code so far, I have a running TicTacToe::Board
> >>>>>    which contains the data structure and I have a AI that takes such
> >>>>>    a board and returns a new one with a move applied.
> >>>>>
> >>>>>    As such, I’d like to simplify my “Shoes view” to always redraw the
> >>>>>    current board. for that, should I put it all in a top-level stack
> >>>>>    and do stack.clear ? or are the other techniques? I’d like to keep
> >>>>>    my Cells (the ones that are drawn) immutable to make it easier to
> >>>>>    reason about the code :)
> >>>>>
> >>>>>    Cheers and thanks so much so far!
> >>>>>    Felipe
> >>>>>
> >>>>>    On 15 Jul 2014, at 21:13, KC Erb <iamkc erb@gmai l.com
> >>>>> <mailto:iamkcerb@gmail.com>
> >>>>>    <mailto:iam+kcerb@gmail.com>> wrote:
> >>>>>
> >>>>>>    Oh whoops! I should have actually looked at the line you asked
> >>>>>>    about instead of just assuming. Yeah, that's a typo.
> >>>>>>
> >>>>>>    Good catch!
> >>>>>>
> >>>>>>
> >>>>>>    On Tue, Jul 15, 2014 at 2:10 PM, Cecil Coupe
> >>>>>> <ccoupe@cableone.net <mailto:ccoupe@cableone.net>
> >>>>>>    <mailto:ccoupe@cableone.net>> wrote:
> >>>>>>
> >>>>>>        I mean the line 8 of cell.rb of your gist.  Line 9 is where
> >>>>>>        where you put the 'x' and 'o'. You do need that. Line 8 is
> >>>>>>        just 'para' which causes the layout to go wrong.
> >>>>>>
> >>>>>>
> >>>>>>       ; & nbsp;On 07/15/2014 01:34 PM, KC Erb wrote:
> >>>>>>>        That depends . . . in my quick sketch of the game I am just
> >>>>>>>        using a para for placing X's (or O's) on the board via
> >>>>>>>        para.replace. So yes, it does need it.
> >>>>>>>
> >>>>>>>        But I imagine that the real game could use an image, or
> >>>>>>>        something else
> >>>>>>>
> >>>>>>>
> >>>>>>>        On Tue, Jul 15, 2014 at 1:27 PM, Cecil Coupe
> >>>>>>>        <ccoupe@cableone.net
> >>>>>>> <mailto:ccoupe@cableone.net> <mailto:ccoupe@cableone.net>> wrote:
> >>>>>>>
> >>>>>>>            If I comment out line 8 of cell.rb (a bare 'para') t hen
> >>>>>>> & nbsp;          it works fine on
> >>>>>>>            Linux and OSX. Does Shoes4 really need that bare para?
> >>>>>>>
> >>>>>>>            On 07/15/2014 11:35 AM, KC Erb wrote:
> >>>>>>>> Hey Cecil !
> >>>>>>>> (if you're reading this)
> >>>>>>>>
> >>>>>>>> Just wanted to let you know that I just tested out
> >>>>>>>            this app on the new
> >>>>>>>> 3.2 release and everything works, except the cells get
> >>>>>>>            placed
> >>>>>>>> incorrectly (I'm on OSX 10.9).
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>        --
> >>>>>>>         "If there is an exception to every rule, th en 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."
> >>>>
> >>>
> >>> --
> >>> www.pragtob.info <http://www.pragtob.info/>*
> >> *
> >> *
> > *
> > *
> > **
>
> --
> www.pragtob.info
>
>


-- 
 "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] Multiple questions on using Shoes

From:
Tobias Pfeiffer
Date:
2014-07-16 @ 16:06
:)

I may have referred to this before, but I believe my pomodoro_tracker 
is a pretty nice example of how I think testing currently works in 
shoes: https://github.com/PragTob/pomodoro_tracker (take a look at the 
spec folder to find the tests)

On Wed 16 Jul 2014 06:04:01 PM CEST, KC Erb wrote:
> Also I can't really help on the testing because I just plain don't
> know. I'm new to programming in general  :)
>
> (I spent the morning learning about MVC after reading Tobi's response
> and scratching my head.)
>
>
> On Wed, Jul 16, 2014 at 9:56 AM, Tobias Pfeiffer
> <tobias.pfeiffer@student.hpi.uni-potsdam.de
> <mailto:tobias.pfeiffer@student.hpi.uni-potsdam.de>> wrote:
>
>     Hi Felipe,
>
>     thank you for reporting the issue. I filed it as #787
>     https://github.com/shoes/shoes4/issues/787
>
>     As for how testing would work... in my eyes that would be a whole
>     separate `backend` for shoes that instead of drawing would create an
>     internal structure of the application which one could query
>     afterwards.
>     I have no time to go into further detail right now - my Master's
>     thesis
>     is angrily waiting for me ;)
>
>     Cheers + thanks,
>     Tobi
>
>     On 07/16/2014 01:01 PM, Felipe Sere wrote:
>     > Annnd I figured that bit out…
>     >
>     > I had to call app.cell( …parameters…)
>     > I guess the problem is that the method “cell” is not being
>     delegated to
>     > as only
>     > *Shoes::App::DELEGATE_METHODS
>     >  are being delegated. Maybe a
>     > Shoes::App::DELEGATE_METHODS << dsl_name
>     > would help in this case? It would certainly add new widgets
>     names to the
>     > methods which would be delegated, right?
>     >
>     > Felipe
>     >
>     >
>     > On 16 Jul 2014, at 11:54, Felipe Sere <felipesere@gmail.com
>     <mailto:felipesere@gmail.com>
>     > <mailto:felipesere@ <mailto:felipesere@> gmail.co
>     <http://gmail.co> m>> wrote:
>     >
>     >> Thanks Tobias,
>     >>
>     >> Do you have any ideas how testing for Shoes could look like? I
>     might
>     >> get time to work on something, but I would definitely need some
>     >> guidance :)
>     >>
>     >> On a different note:
>     >> How does Shoes handle the fact that one S::Widget uses another
>     S:Widget?
>     >> I have a BoardView which uses my Cell.
>     >> I expected the call to “cells” to just work… but I am getting
>     >> an /“undefined method `cell’ for #BoardView<….>”./
>     >>
>     >> Might it be an ordering issue? I looked at the source of S::Widget,
>     >> but I am pretty sure that *inherited *gets called pretty early,
>     right?
>     >> So the method   “cell� �� should be available on Shoes::App, right?
>     >>
>     >> I can post my code if that is necessary.
>     >>
>     >> Felipe
>     >>
>     >> On 16 Jul 2014, at 11:27, Tobias Pfeiffer
>     >> <tobias.pfeiffer@student.hpi.uni-potsdam.de
>     <mailto:tobias.pfeiffer@student.hpi.uni-potsdam.de>
>     >> <mailto:tobias.pfeiffer@student.hpi.uni-potsdam.de
>     <mailto:tobias.pfeiffer@student.hpi.uni-potsdam.de>>> wrote:
>     >>
>     >>> Testing Shoes is hard. I still want to write a mock back-end (some
>     >>> day...) that allows for better testing.
>     >>>
>     >>> In the mean time I suggest that you put all logic in models
>     that don't
>     >>> use any shoes methods (which is good any way). Then use those
>     in the
>     >>> views. Only test the models.*
>     >>> So rry I am not aware of a better solution at the moment.
>     >>>
>     >>> Tobi
>     >>>
>     >>> On 07/16/2014 10:00 AM, Felipe Sere wrote:
>     >>>> Yeah, re-reading my last mail I see now that it sounds confusing…
>     >>>>
>     >>>> I have my board (model) and an AI that can manipulate the board.
>     >>>> Your first option with
>     >>>>    @main_stack.clear { draw_main_stack(data_structure) }
>     >>>> should do just fine :)
>     >>>>
>     >>>> How would you go about testing a Shoes app? Are there any
>     test doubles
>     >>>> with methods that can assert on the content and /things…?/
>     >>>> /
>     >>>> /
>     >>>> Cheers,
>     >>>> Felipe
>     >>>>
>     >>>>
>     >>>> On 16 Jul 2014, at 02:02, KC Erb <iamkcerb@gmail.com
>     <mailto:iamkcerb@gmail.com>
>     >>>> <mailto:iamkcerb@gmail.com <mailto:iamkcerb@gmail.com>>
>     >>>> <mailto:iamkcerb@gmail.com <mailto:iamkcerb@gmail.com>>> wrote:
>     >>>>
>     >>>>> Hmm . . . I'm not sure I underst and the question. It sounds
>     like
>     >>>>> you're doing what I would do (stick everything in a slot and use
>     >>>>> clear).
>     >>>>>
>     >>>>> You asked about other techniques so I'll point out some
>     other things
>     >>>>> that I might try depending on what fits best:
>     >>>>>
>     >>>>> 1) In case you're not aware you can hand clear a block:
>     >>>>>
>     >>>>> @main_stack.clear { draw_main_stack(data_structure) }
>     >>>>>
>     >>>>> 2) The other thing that comes to mind is that you mentioned
>     keeping
>     >>>>> the cells immutable; you could iterate through the new data
>     structure
>     >>>>> and when you find a difference just clear and redraw the new
>     cell.
>     >>>>>
>     >>>>> Just a thought. If that doesn't answer it feel free to let
>     me know.
>     >>>>>
>     >>>>>
>     >>>>>
>     >>>>>
>     >>>>> On Tue, Jul 15, 2014 at 2:49 PM, Felipe Sere
>     <felipesere@gmail.com <mailto:felipesere@gmail.com>
>     >>>>> <mailto:felipesere@gmail.com <mailto:felipesere@gmail.com>>
>     >>>>> <mailto:felipesere@gmail.com <mailto:felipesere@gmail.com>>>
>     wrote:
>     >>>>>
>     >>>>>    Next question :-)
>     >>>>>
>     >>>>>    In yo ur versi on of TTT, you do a letter.replace to
>     change from “ “
>     >>>>>    to either X or O.
>     >>>>>    The way I have my code so far, I have a running
>     TicTacToe::Board
>     >>>>>    which contains the data structure and I have a AI that
>     takes such
>     >>>>>    a board and returns a new one with a move applied.
>     >>>>>
>     >>>>>    As such, I’d like to simplify my “Shoes view” to always
>     redraw the
>     >>>>>    current board. for that, should I put it all in a
>     top-level stack
>     >>>>>    and do stack.clear ? or are the other techniques? I’d
>     like to keep
>     >>>>>    my Cells (the ones that are drawn) immutable to make it
>     easier to
>     >>>>>    reason about the code :)
>     >>>>>
>     >>>>>    Cheers and thanks so much so far!
>     >>>>>    Felipe
>     >>>>>
>     >>>>>    On 15 Jul 2014, at 21:13, KC Erb <iamkc erb@gmai l.com
>     <http://l.com>
>     >>>>> <mailto:iamkcerb@gmail.com <mailto:iamkcerb@gmail.com>>
>     >>>>>    <mailto:iam+kcerb@gmail.com
>     <mailto:iam%2Bkcerb@gmail.com>>> wrote:
>     >>>>>
>     >>>>>>    Oh whoops! I should have actually looked at the line you
>     asked
>     >>>>>>    about instead of just assuming. Yeah, that's a typo.
>     >>>>>>
>     >>>>>>    Good catch!
>     >>>>>>
>     >>>>>>
>     >>>>>>    On Tue, Jul 15, 2014 at 2:10 PM, Cecil Coupe
>     >>>>>> <ccoupe@cableone.net <mailto:ccoupe@cableone.net>
>     <mailto:ccoupe@cableone.net <mailto:ccoupe@cableone.net>>
>     >>>>>>    <mailto:ccoupe@cableone.net
>     <mailto:ccoupe@cableone.net>>> wrote:
>     >>>>>>
>     >>>>>>        I mean the line 8 of cell.rb of your gist.  Line 9
>     is where
>     >>>>>>        where you put the 'x' and 'o'. You do need that.
>     Line 8 is
>     >>>>>>        just 'para' which causes the layout to go wrong.
>     >>>>>>
>     >>>>>>
>     >>>>>>       ; & nbsp;On 07/15/2014 01:34 PM, KC Erb wrote:
>     >>>>>>>        That depends . . . in my quick sketch of the game I
>     am just
>     >>>>>>>        using a para for placing X's (or O's) on the board via
>     >>>>>>>        para.replace. So yes, it does need it.
>     >>>>>>>
>     >>>>>>>        But I imagine that the real game could use an image, or
>     >>>>>>>        something else
>     >>>>>>>
>     >>>>>>>
>     >>>>>>>        On Tue, Jul 15, 2014 at 1:27 PM, Cecil Coupe
>     >>>>>>>        <ccoupe@cableone.net <mailto:ccoupe@cableone.net>
>     >>>>>>> <mailto:ccoupe@cableone.net <mailto:ccoupe@cableone.net>>
>     <mailto:ccoupe@cableone.net <mailto:ccoupe@cableone.net>>> wrote:
>     >>>>>>>
>     >>>>>>>            If I comment out line 8 of cell.rb (a bare
>     'para') t hen
>     >>>>>>> & nbsp;          it works fine on
>     >>>>>>>            Linux and OSX. Does Shoes4 really need that
>     bare para?
>     >>>>>>>
>     >>>>>>>            On 07/15/2014 11:35 AM, KC Erb wrote:
>     >>>>>>>> Hey Cecil !
>     >>>>>>>> (if you're reading this)
>     >>>>>>>>
>     >>>>>>>> Just wanted to let you know that I just tested out
>     >>>>>>>            this app on the new
>     >>>>>>>> 3.2 release and everything works, except the cells get
>     >>>>>>>            placed
>     >>>>>>>> incorrectly (I'm on OSX 10.9).
>     >>>>>>>>
>     >>>>>>>
>     >>>>>>>
>     >>>>>>>
>     >>>>>>>
>     >>>>>>>        --
>     >>>>>>>         "If there is an exception to every rule, th en
>     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."
>     >>>>
>     >>>
>     >>> --
>     >>> www.pragtob.info <http://www.pragtob.info>
>     <http://www.pragtob.info/>*
>     >> *
>     >> *
>     > *
>     > *
>     > **
>
>     --
>     www.pragtob.info <http://www.pragtob.info>
>
>
>
>
> --
>  "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."

--
www.pragtob.info