Hello,
Im busy with book 1 and I work with version 1 Now this morning I did some changes and save it under a name. But when I just start up Pharo I see the pharo1.img again without my changes. And I also do not see a menu where I can choose which image I want to use as version 2 of Pharo does. How can I proceed where I quit with the right image. Roelof |
Hello Roelof,
That is a disadvantage of having a one-click that opens everywhere. It contains a script telling the executable which image to open. You should be able to find your image, and drag it onto the vm to open. If you just gave it a different name, it is in Contents\Resources You might want to change your pharo.ini to point to the right image. Experienced smalltalkers don’t worry too much about saving (and disposing of) images. Source code is versioned using Monticello (a few chapters away) and we use continuous integration to build new images whenever source code has changed, effectively giving us a new image to work with each morning. Stephan |
Stephan Eggermont schreef op 31-3-2014 14:37:
> Hello Roelof, > > That is a disadvantage of having a one-click that opens everywhere. > It contains a script telling the executable which image to open. > You should be able to find your image, and drag it onto the vm > to open. If you just gave it a different name, it is in > Contents\Resources > You might want to change your pharo.ini to point to the right image. > > Experienced smalltalkers don’t worry too much about saving (and > disposing of) images. Source code is versioned using Monticello > (a few chapters away) and we use continuous integration to build > new images whenever source code has changed, effectively > giving us a new image to work with each morning. > > Stephan > Thanks, Next problem. According to the manual I have to make a new "script" on the initializing protocol. So I did this : initialize | sampleCell width height n | super initialize. n:=self CellsPerSide. sampleCell := LOCell new. width := sampleCell width. height := sampleCell height. self bounds: (5*5 extent: ((width * n ) @(height * n)) + ( 2 * self BorderWidth)). cells:= Matrix new: n tabulate: [:i :j| self newCellAt: i at: j] CellsPerSide "The number of cells along each side of the game" ^ 10 but Pharo 1 makes this : initialize | sampleCell width height n | super initialize. n:=self CellsPerSide. sampleCell := LOCell new. width := sampleCell width. height := sampleCell height. self bounds: (5*5 extent: ((width * n ) @(height * n)) + ( 2 * self BorderWidth)). cells:= Matrix new: n tabulate: [:i :j| self newCellAt: i at: j] CellsPerSide "The number of cells along each side of the game" Nothing more expected ->^ 10 What did I do wring this time ? Roelof |
In reply to this post by Roelof
Two things come to mind:
- method names start with lowercase CellsPerSide - did you make cellsPerSide into a separate method? Stephan |
Stephan Eggermont schreef op 31-3-2014 15:35:
> Two things come to mind: > - method names start with lowercase > CellsPerSide you are right, I mistyped that one. I wil change it > - did you make cellsPerSide into a separate method? You mean choose all and then type in the text. nope, if that is the meaning then I misread the manual. How do I make it part of the initialized protocol then, Roelof |
In reply to this post by Roelof
You can only enter one method at a time.
And methods should be small and be lowercase. On 31 Mar 2014, at 15:03, Roelof Wobben <[hidden email]> wrote: > What did I do wring this time ? |
In reply to this post by Roelof
On 31 mars 2014, at 15:43, Roelof Wobben <[hidden email]> wrote: > Stephan Eggermont schreef op 31-3-2014 15:35: >> Two things come to mind: >> - method names start with lowercase >> CellsPerSide > > you are right, I mistyped that one. I wil change it >> - did you make cellsPerSide into a separate method? > > You mean choose all and then type in the text. > nope, if that is the meaning then I misread the manual. > > How do I make it part of the initialized protocol then, When you write a method in the editor pane and save it, the protocol of the method is the one currently selected in the protocol pane (or 'as yet unclassified' is there is none selected). In case of mistake, you can always reorganize your methods amongst the different protocols. > > Roelof > > > |
Camille Teruel schreef op 31-3-2014 15:49:
> On 31 mars 2014, at 15:43, Roelof Wobben <[hidden email]> wrote: > >> Stephan Eggermont schreef op 31-3-2014 15:35: >>> Two things come to mind: >>> - method names start with lowercase >>> CellsPerSide >> you are right, I mistyped that one. I wil change it >>> - did you make cellsPerSide into a separate method? >> You mean choose all and then type in the text. >> nope, if that is the meaning then I misread the manual. >> >> How do I make it part of the initialized protocol then, > When you write a method in the editor pane and save it, the protocol of the method is the one currently selected in the protocol pane (or 'as yet unclassified' is there is none selected). > In case of mistake, you can always reorganize your methods amongst the different protocols. > >> Roelof >> >> >> > > Thanks all. Now trying to solve the last typos and hopefully the games works. Roelof |
In reply to this post by Roelof
On which os are you?
The new image on mac should be under the ressources folder and the script just opens the default one. > > Im busy with book 1 and I work with version 1 > Now this morning I did some changes and save it under a name. > > But when I just start up Pharo I see the pharo1.img again without my changes. > And I also do not see a menu where I can choose which image I want to use as version 2 of Pharo does. > > How can I proceed where I quit with the right image. > > Roelof > > |
Free forum by Nabble | Edit this page |