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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

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

dav0
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@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@y; copyBits]].
aPort colorMap: savedMap.

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

Chris Cunnington
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@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@y; copyBits]].
aPort colorMap: savedMap.


_______________________________________________
Beginners mailing list
[hidden email]
http://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
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

dav0
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 <[hidden email]> 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@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@y; copyBits]].
aPort colorMap: savedMap.


_______________________________________________
Beginners mailing list
[hidden email]
http://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
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

Chris Cunnington
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 <[hidden email]> 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@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@y; copyBits]].
aPort colorMap: savedMap.


_______________________________________________
Beginners mailing list
[hidden email]
http://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
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners




_______________________________________________
Beginners mailing list
[hidden email]
http://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



Squeak by Example

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

dav0
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 <[hidden email]> 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 <[hidden email]> 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@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@y; copyBits]].
aPort colorMap: savedMap.


_______________________________________________
Beginners mailing list
[hidden email]
http://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
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners




_______________________________________________
Beginners mailing list
[hidden email]
http://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
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

Chris Cunnington
On 12-08-22 3:33 PM, dav0 wrote:

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

OK, you've got everything in a Workspace. And there's a syntax error.

The first thing I would do is click the blue down arrow on the Workspace
and select "save contents to file...", which will put a file in your
image directory of the contents of the Workspace.
The next thing would be to quit without saving. Notice I said "without".
That will get rid off the code you just loaded from the Internet.
Then open your file of saved code, cut and paste it into a Workspace,
and resume looking for the syntax error.

HTH,

Chris
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

dav0
Oops!  I must not have done this the way you had in mind because when I did the "save contents to a file" command from my Workspace window, I apparently only ended up with a file (default filename= "Workspace.text") with the following text in it:

SBEGame new openInWorld

Since I did not save anything, I ended up losing my entire tutorial.  I guess I should have verified that I had something of use in that file before I quit Squeak without saving.  The good news is: the error is certainly gone now!


On Wed, Aug 22, 2012 at 3:39 PM, Chris Cunnington <[hidden email]> wrote:
On 12-08-22 3:33 PM, dav0 wrote:
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


OK, you've got everything in a Workspace. And there's a syntax error.

The first thing I would do is click the blue down arrow on the Workspace and select "save contents to file...", which will put a file in your image directory of the contents of the Workspace.
The next thing would be to quit without saving. Notice I said "without". That will get rid off the code you just loaded from the Internet.
Then open your file of saved code, cut and paste it into a Workspace, and resume looking for the syntax error.


HTH,

Chris
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

dav0
OK, so I rebuilt the tutorial from scratch and I am able to reproduce the syntax error again now when I click on a yellow square.  I'm not real sure what the syntax error is because the tutorial hasn't covered much of the Smalltalk syntax yet.

I am also seeing the same sort of display symptoms as before, where the checkerboard is offset around 50 pixels both in the x and the y directions - indicating that the syntax error has something to do with the checkerboard's positioning.

I am attaching the sources which I manually saved along the way (SBE-Quinto.sources).  Note: I did make one change to the original PDF code which seems to have an extra dash '-' in the Class category (package) name, where two of the provided methods specify "SBE--Quinto" instead of "SBE-Quinto" as the tutorial says to use.

The one thing which I am doing that I suspect may be part of the problem is the fact that I have newer Squeak sources than those which are referenced by the book.  The book's SBE image seems to complain every time I start up displaying a little pop-up which says "SqueakV39.sources does not exist" at which point, I always "Choose another name" from the menu and select my more recent "SqueakV41.sources" which I downloaded previously.  Could this be causing this issue?

Thanks
Dave


On Wed, Aug 22, 2012 at 4:15 PM, dav0 <[hidden email]> wrote:
Oops!  I must not have done this the way you had in mind because when I did the "save contents to a file" command from my Workspace window, I apparently only ended up with a file (default filename= "Workspace.text") with the following text in it:

SBEGame new openInWorld

Since I did not save anything, I ended up losing my entire tutorial.  I guess I should have verified that I had something of use in that file before I quit Squeak without saving.  The good news is: the error is certainly gone now!


On Wed, Aug 22, 2012 at 3:39 PM, Chris Cunnington <[hidden email]> wrote:
On 12-08-22 3:33 PM, dav0 wrote:
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


OK, you've got everything in a Workspace. And there's a syntax error.

The first thing I would do is click the blue down arrow on the Workspace and select "save contents to file...", which will put a file in your image directory of the contents of the Workspace.
The next thing would be to quit without saving. Notice I said "without". That will get rid off the code you just loaded from the Internet.
Then open your file of saved code, cut and paste it into a Workspace, and resume looking for the syntax error.


HTH,

Chris
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

SBE-Quinto.sources (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

Chris Cunnington
On 12-08-22 5:46 PM, dav0 wrote:

> OK, so I rebuilt the tutorial from scratch and I am able to reproduce
> the syntax error again now when I click on a yellow square.  I'm not
> real sure what the syntax error is because the tutorial hasn't covered
> much of the Smalltalk syntax yet.
>
> I am also seeing the same sort of display symptoms as before, where
> the checkerboard is offset around 50 pixels both in the x and the y
> directions - indicating that the syntax error has something to do with
> the checkerboard's positioning.
>
> I am attaching the sources which I manually saved along the way
> (SBE-Quinto.sources).  Note: I did make one change to the original PDF
> code which seems to have an extra dash '-' in the Class category
> (package) name, where two of the provided methods specify
> "SBE--Quinto" instead of "SBE-Quinto" as the tutorial says to use.
>
> The one thing which I am doing that I suspect may be part of the
> problem is the fact that I have newer Squeak sources than those which
> are referenced by the book.  The book's SBE image seems to complain
> every time I start up displaying a little pop-up which says
> "SqueakV39.sources does not exist" at which point, I always "Choose
> another name" from the menu and select my more recent
> "SqueakV41.sources" which I downloaded previously.  Could this be
> causing this issue?
>
> Thanks
> Dave

Hi Dave,

Kudos to you for persisting and rebuilding the exercise. That's good.
You do want to match your sources file with the right image. As you can
see from this page, there are sources for various Squeak releases:

http://squeak.org/Download/

It sounds to me that if you are starting and it asks for
SqueakV39.sources, then you are downloading an image from somewhere of
which I am unfamiliar. It might be easiest to download Squeak from the
homepage, get an all-in-one and leave the business of sources files to
the maker of that package.

http://www.squeak.org.

The sources may be the problem. They may not be. Either way, perhaps you
should upgrade to contemporary Squeak? Then, you have the working
sources available at

http://www.squeaksource.com/SqueakByExample

You can use that version of the game to compare with the one you've
rebuilt by hand.

I'm not sure it's my role here to actually find the syntax error for
you. Bug hunting is really the fun of programming and I wouldn't want to
take that way from you. :)

HTH,
Chris

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

dav0
Hmmm...  I tried saving & quitting, then downloading SqueakV39.sources.gz from http://squeak.org/Download/, unzipping this and copying the resulting SqueakV39.sources into my workspace and re-running my Squeak vm and I can still reproduce the error.

I am also not sure what you mean by contemporary Squeak, but I am running this on Linux Fedora, with the latest squeak-vm which I installed using yum as follows:

$ yum install squeak-vm

$ squeak -version
3.10-5 #1 Mon Jun 21 22:10:08 UTC 2010 gcc 4.4.4
Squeak3.10beta of 22 July 2007 [latest update: #7159]
Linux x86-04.phx2.fedoraproject.org 2.6.18-194.3.1.el5 #1 SMP Sun May 2 04:17:42 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
default plugin location: /usr/lib64/squeak/3.10-5/*.so

As for the love of debugging, let's just say that I'm sharing the love.  :-)  Actually, I'd love to see this software work - it seems like a really neat language toolset.

Thanks again,
Dave


On Wed, Aug 22, 2012 at 5:58 PM, Chris Cunnington <[hidden email]> wrote:
On 12-08-22 5:46 PM, dav0 wrote:
OK, so I rebuilt the tutorial from scratch and I am able to reproduce the syntax error again now when I click on a yellow square.  I'm not real sure what the syntax error is because the tutorial hasn't covered much of the Smalltalk syntax yet.

I am also seeing the same sort of display symptoms as before, where the checkerboard is offset around 50 pixels both in the x and the y directions - indicating that the syntax error has something to do with the checkerboard's positioning.

I am attaching the sources which I manually saved along the way (SBE-Quinto.sources).  Note: I did make one change to the original PDF code which seems to have an extra dash '-' in the Class category (package) name, where two of the provided methods specify "SBE--Quinto" instead of "SBE-Quinto" as the tutorial says to use.

The one thing which I am doing that I suspect may be part of the problem is the fact that I have newer Squeak sources than those which are referenced by the book.  The book's SBE image seems to complain every time I start up displaying a little pop-up which says "SqueakV39.sources does not exist" at which point, I always "Choose another name" from the menu and select my more recent "SqueakV41.sources" which I downloaded previously.  Could this be causing this issue?

Thanks
Dave

Hi Dave,

Kudos to you for persisting and rebuilding the exercise. That's good.
You do want to match your sources file with the right image. As you can see from this page, there are sources for various Squeak releases:

http://squeak.org/Download/

It sounds to me that if you are starting and it asks for SqueakV39.sources, then you are downloading an image from somewhere of which I am unfamiliar. It might be easiest to download Squeak from the homepage, get an all-in-one and leave the business of sources files to the maker of that package.

http://www.squeak.org.

The sources may be the problem. They may not be. Either way, perhaps you should upgrade to contemporary Squeak? Then, you have the working sources available at

http://www.squeaksource.com/SqueakByExample

You can use that version of the game to compare with the one you've rebuilt by hand.

I'm not sure it's my role here to actually find the syntax error for you. Bug hunting is really the fun of programming and I wouldn't want to take that way from you. :)


HTH,
Chris

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

Chris Cunnington
On 12-08-22 6:20 PM, dav0 wrote:
Hmmm...  I tried saving & quitting, then downloading SqueakV39.sources.gz from http://squeak.org/Download/, unzipping this and copying the resulting SqueakV39.sources into my workspace and re-running my Squeak vm and I can still reproduce the error.

I am also not sure what you mean by contemporary Squeak, but I am running this on Linux Fedora, with the latest squeak-vm which I installed using yum as follows:

$ yum install squeak-vm

$ squeak -version
3.10-5 #1 Mon Jun 21 22:10:08 UTC 2010 gcc 4.4.4
Squeak3.10beta of 22 July 2007 [latest update: #7159]
Linux x86-04.phx2.fedoraproject.org 2.6.18-194.3.1.el5 #1 SMP Sun May 2 04:17:42 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
default plugin location: /usr/lib64/squeak/3.10-5/*.so

As for the love of debugging, let's just say that I'm sharing the love.  :-)  Actually, I'd love to see this software work - it seems like a really neat language toolset.

Thanks again,
Dave



OK, I see where you're coming from. When I use Ubuntu 10.03 I get Squeak by going to http://www.squeak.org and in the upper right hand corner is the Downloads pane with a link that says All-In-One. Click that. I put the unzipped package on my desktop. Then I cd into Squeak-All-In-One.app. Once in there there is a script called squeak.sh.

./squeak.sh

in the Terminal and all that sources stuff is behind you. It'll open up, etc. The deployment with yum is understandable, but that stuff relies upon third parties whom are behind our update curve. The Squeak homepage is the best place to get Squeak.

Chris

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

dav0
Ah - OK.  That was where I started out too, but I wasn't quite able to get much traction with that method because of an external drive issue: I had originally wanted to set up my workspace on my external drive - which was NTFS and Linux doesn't allow you to chmod on NTFS filesystems.  As a result, I was never able to actually run the squeak.sh script there, so I gave up on that zip and later ended up discovering the yum install - which I far prefer anyway (I hope this isn't the problem).

So wouldn't the fact that I was able to run the example just fine when I tried your first recommendation (loading the repository from the URL) mean that my squeak-vm is ok?

Thanks
Dave

On Wed, Aug 22, 2012 at 6:30 PM, Chris Cunnington <[hidden email]> wrote:
On 12-08-22 6:20 PM, dav0 wrote:
Hmmm...  I tried saving & quitting, then downloading SqueakV39.sources.gz from http://squeak.org/Download/, unzipping this and copying the resulting SqueakV39.sources into my workspace and re-running my Squeak vm and I can still reproduce the error.

I am also not sure what you mean by contemporary Squeak, but I am running this on Linux Fedora, with the latest squeak-vm which I installed using yum as follows:

$ yum install squeak-vm

$ squeak -version
3.10-5 #1 Mon Jun 21 22:10:08 UTC 2010 gcc 4.4.4
Squeak3.10beta of 22 July 2007 [latest update: #7159]
Linux x86-04.phx2.fedoraproject.org 2.6.18-194.3.1.el5 #1 SMP Sun May 2 04:17:42 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
default plugin location: /usr/lib64/squeak/3.10-5/*.so

As for the love of debugging, let's just say that I'm sharing the love.  :-)  Actually, I'd love to see this software work - it seems like a really neat language toolset.

Thanks again,
Dave



OK, I see where you're coming from. When I use Ubuntu 10.03 I get Squeak by going to http://www.squeak.org and in the upper right hand corner is the Downloads pane with a link that says All-In-One. Click that. I put the unzipped package on my desktop. Then I cd into Squeak-All-In-One.app. Once in there there is a script called squeak.sh.

./squeak.sh

in the Terminal and all that sources stuff is behind you. It'll open up, etc. The deployment with yum is understandable, but that stuff relies upon third parties whom are behind our update curve. The Squeak homepage is the best place to get Squeak.

Chris

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

dav0
Oh, and now I remember the other reason that the Squeak-4.3-All-in-One.app didn't work for me on my 64 bit Linux system:

$ chmod +x squeak.sh
$ ./squeak.sh
Running 32-bit Squeak on a 64-bit System. Hope the 32-bit runtime libraries are installed ...
./squeak.sh: line 38: /home/dav0/vr/squeak/a1/Squeak-4.3-All-in-One.app/Contents/Linux-i686/bin/squeak: Permission denied
./squeak.sh: line 38: exec: /home/dav0/vr/squeak/a1/Squeak-4.3-All-in-One.app/Contents/Linux-i686/bin/squeak: cannot execute: Permission denied


On Wed, Aug 22, 2012 at 6:57 PM, dav0 <[hidden email]> wrote:
Ah - OK.  That was where I started out too, but I wasn't quite able to get much traction with that method because of an external drive issue: I had originally wanted to set up my workspace on my external drive - which was NTFS and Linux doesn't allow you to chmod on NTFS filesystems.  As a result, I was never able to actually run the squeak.sh script there, so I gave up on that zip and later ended up discovering the yum install - which I far prefer anyway (I hope this isn't the problem).

So wouldn't the fact that I was able to run the example just fine when I tried your first recommendation (loading the repository from the URL) mean that my squeak-vm is ok?

Thanks
Dave

On Wed, Aug 22, 2012 at 6:30 PM, Chris Cunnington <[hidden email]> wrote:
On 12-08-22 6:20 PM, dav0 wrote:
Hmmm...  I tried saving & quitting, then downloading SqueakV39.sources.gz from http://squeak.org/Download/, unzipping this and copying the resulting SqueakV39.sources into my workspace and re-running my Squeak vm and I can still reproduce the error.

I am also not sure what you mean by contemporary Squeak, but I am running this on Linux Fedora, with the latest squeak-vm which I installed using yum as follows:

$ yum install squeak-vm

$ squeak -version
3.10-5 #1 Mon Jun 21 22:10:08 UTC 2010 gcc 4.4.4
Squeak3.10beta of 22 July 2007 [latest update: #7159]
Linux x86-04.phx2.fedoraproject.org 2.6.18-194.3.1.el5 #1 SMP Sun May 2 04:17:42 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
default plugin location: /usr/lib64/squeak/3.10-5/*.so

As for the love of debugging, let's just say that I'm sharing the love.  :-)  Actually, I'd love to see this software work - it seems like a really neat language toolset.

Thanks again,
Dave



OK, I see where you're coming from. When I use Ubuntu 10.03 I get Squeak by going to http://www.squeak.org and in the upper right hand corner is the Downloads pane with a link that says All-In-One. Click that. I put the unzipped package on my desktop. Then I cd into Squeak-All-In-One.app. Once in there there is a script called squeak.sh.

./squeak.sh

in the Terminal and all that sources stuff is behind you. It'll open up, etc. The deployment with yum is understandable, but that stuff relies upon third parties whom are behind our update curve. The Squeak homepage is the best place to get Squeak.

Chris

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners




_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

Chris Cunnington
On 12-08-22 7:25 PM, dav0 wrote:

> Oh, and now I remember the other reason that the
> Squeak-4.3-All-in-One.app didn't work for me on my 64 bit Linux system:
>
> $ chmod +x squeak.sh
> $ ./squeak.sh
> Running 32-bit Squeak on a 64-bit System. Hope the 32-bit runtime
> libraries are installed ...
> ./squeak.sh: line 38:
> /home/dav0/vr/squeak/a1/Squeak-4.3-All-in-One.app/Contents/Linux-i686/bin/squeak:
> Permission denied
> ./squeak.sh: line 38: exec:
> /home/dav0/vr/squeak/a1/Squeak-4.3-All-in-One.app/Contents/Linux-i686/bin/squeak:
> cannot execute: Permission denied
>
>
Yea, the 64-bit issue is pretty legit. I don't think there's any problem
at all with the Linux distros. I've installed using yum and it's a more
pleasant way to go. I was just mentioning it with reference to matching
source files to images. But it sounds like you've got a working system.
Most people don't get the vm and the image/changes separately, but it
doesn't seem to be holding you back. Tallyho.

Chris
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbie stuck on page 43 of SBE getting syntax error trying to run SBEGame (Quinto)

dav0
Update:

I seem to be able to fix the issue by running the same exact image (in fact I zipped up the entire workspace) on another (slightly newer - Fedora 17 versus Fedora 14) machine.  I now see the "MessageNotUnderstood" error as is documented in the SBE book.

My guess is that maybe the VM on the problem machine has yet to fully flush out the bits of the SqueakV41.sources even though I re-ran the workspace.  Either that, or there is some issue with the older Fedora 14 environment - not sure?
 
The good news is: I'm back in Squeak business!

Thanks
Dave

p.s.  The reason this took so long is because I first had to figure out how to run Squeak remotely from the other machine using X11Forwarding since it is a headless server.  Speak up if anyone is curious as to how I am doing this.


On Wed, Aug 22, 2012 at 7:34 PM, Chris Cunnington <[hidden email]> wrote:
On 12-08-22 7:25 PM, dav0 wrote:
Oh, and now I remember the other reason that the Squeak-4.3-All-in-One.app didn't work for me on my 64 bit Linux system:

$ chmod +x squeak.sh
$ ./squeak.sh
Running 32-bit Squeak on a 64-bit System. Hope the 32-bit runtime libraries are installed ...
./squeak.sh: line 38: /home/dav0/vr/squeak/a1/Squeak-4.3-All-in-One.app/Contents/Linux-i686/bin/squeak: Permission denied
./squeak.sh: line 38: exec: /home/dav0/vr/squeak/a1/Squeak-4.3-All-in-One.app/Contents/Linux-i686/bin/squeak: cannot execute: Permission denied


Yea, the 64-bit issue is pretty legit. I don't think there's any problem at all with the Linux distros. I've installed using yum and it's a more pleasant way to go. I was just mentioning it with reference to matching source files to images. But it sounds like you've got a working system. Most people don't get the vm and the image/changes separately, but it doesn't seem to be holding you back. Tallyho.


Chris
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners