[Newbies] Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

dav0 dav0 at virtualsynthesis.net
Wed Aug 22 19:33:27 UTC 2012


Well, I am following the Book's tutorial, and I have a local workspace
where I have written the entire application from scratch as outlined in the
book, so yes, there is an expected error at this point, but I am expecting
to see a "MessageNotUnderstood" error as the next step has me doing
something to practice using the debugger - I don't think I'm supposed to be
getting the syntax error I am getting.

Another clue on this syntax error is that I can also see the blue game
background displaying in what seems to be the correct location, and then
the checkerboard is displaying too, but it was offset by around 50 pixels
on both the x and y coordinates.  Chances are, whatever the syntax error is
involves the placement of the checkerboard.

At any rate, I guess I need to undo whatever I just did (loading the remote
repository from the URL) so I can get back to diagnosing this issue and/or
skipping this step and moving on to the next one.  Any idea how I can do
this?

Thanks again,
Dave

On Wed, Aug 22, 2012 at 3:11 PM, Chris Cunnington <
smalltalktelevision at gmail.com> wrote:

>  On 12-08-22 2:58 PM, dav0 wrote:
>
> Hi Chris,
>
>  Your method of loading the SBE-Quinto repository from the URL and running
> it that way seems to work fine, so does this mean I introduced the syntax
> error myself?  Or does this mean that the fact that I am using a different
> repository has something to do with why it works this way?
>
> I am still a little too green to figure out where I went wrong.
>  Everything was working up until this point.
>
>  Thanks
>
>  Dave
>
> On Wed, Aug 22, 2012 at 2:29 PM, Chris Cunnington <
> smalltalktelevision at gmail.com> wrote:
>
>>   On 12-08-22 2:17 PM, dav0 wrote:
>>
>>  Hi, Squeak is really cool so far, but I have finally hit a snag I can't
>> seem to figure out, and I think it may have something to do with the fact
>> that I am attempting to run the SBE on a slightly newer version of Squeak
>> maybe?
>>
>>  I am on page 43 of the SBE book and I get the following syntax error
>> when I follow this instruction:
>>
>>  "In a workspace, type SBEGame new openInWorld and do it ."
>>
>>  Thanks!
>>
>>  -dav0
>>
>>  ---------- Syntax Error (Popup window) ------------------
>>
>>  HandMorph Morphic-Kernel he
>>
>> ----------
>>
>>  he user wants it and not just aligned with the cliprect"
>>
>>  (patternForm isForm) ifFalse: [
>>  "patternForm is a Pattern or Color; just Nothing more expected ->use it
>> as a mask for BitBlt"
>>  ^ aPort fill: aPort clipRect fillColor: patternForm rule: Form over].
>>
>>  "do it iteratively"
>>  targetBox _ aPort clipRect.
>>  patternBox _ patternForm boundingBox.
>>  savedMap _ aPort colorMap.
>>  aPort sourceForm: patternForm;
>>  fillColor: nil;
>>  combinationRule: Form paint;
>>  sourceRect: (0 at 0 extent: patternBox extent);
>>  colorMap: (patternForm colormapIfNeededFor: aPort destForm).
>>  top _ (targetBox top truncateTo: patternBox height) + offset y.
>>  left _  (targetBox left truncateTo: patternBox width) + offset x.
>>
>>  left to: (targetBox right - 1) by: patternBox width do:
>>  [:x | top to: (targetBox bottom - 1) by: patternBox height do:
>>  [:y | aPort destOrigin: x at y; copyBits]].
>>  aPort colorMap: savedMap.
>>
>>
>>  _______________________________________________
>> Beginners mailing listBeginners at lists.squeakfoundation.orghttp://lists.squeakfoundation.org/mailman/listinfo/beginners
>>
>>  When I go to http://www.squeaksource.com/SqueakByExample I see that the
>> example code for the book is available.
>>
>> I click on Tools in Squeak and select MonticelloBrowser. I then hit
>> AddRepository, click HTTP, and then add SqueakByExample after
>> http://www.squeaksource.com in location:. I accept and close the window.
>> Click Open. In the new window click SBE-Quinto on the left. Then press
>> Load.
>>
>> Now open a Workspace. Type:
>>
>> SBEGame new openInWorld
>>
>> highlight it and do it. Then you'll see the game.
>> This was in a 4.4 alpha build number #12186, which is very recent. So, as
>> far as I cans see, the Quinto game mentioned on pg. 43 of SBE still works.
>>
>> Chris
>>
>> _______________________________________________
>> Beginners mailing list
>> Beginners at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>>
>>
>
>
> _______________________________________________
> Beginners mailing listBeginners at lists.squeakfoundation.orghttp://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>  If you follow the book, the next paragraph on pg. 43 says:
>
>  The game will open, and you should be able to click on the cells and see
> how it works.
>
> Well, so much for theory. . . When you click on a cell, a notifier window
> called the PreDebugWindow window appears with an error message! As
> depicted in Figure 2.12, it says MessageNotUnderstood:
> SBEGame»toggleState.
>
> So I'm not sure it's supposed to work at that point. I think it's making a
> point about the Debugger or something.
>
> Incidentally I don't know why it says "and do it", as "new openInWorld"
> seems to be enough.
>
> You have another repository? OK.
>
> At any rate this version seems to work alright. I always prefer to use a
> working example and see how it works. I wouldn't sweat the details to much.
> It sounds like you're getting the general idea of things.
>
> HTH,
> Chris
>
>
>
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20120822/91527319/attachment-0001.htm


More information about the Beginners mailing list