Hello all. I'am learning to use Voyage by trying the examples in the Voyage doc (in the Enterprise Pharo book). I read "By default, Voyage works in instance mode". If I run the example in instance mode, I get an error via the debugger. |repo anAssociation| repo := VOMemoryRepository new. anAssociation := #answer -> 42. anAssociation save: repo. ==> "Instance of Association did not understand #save:" What am I doing wrong? Dominique |
> On 25 Jan 2018, at 23:03, Dominique Dartois <[hidden email]> wrote: > > Hello all. > > I'am learning to use Voyage by trying the examples in the Voyage doc (in the Enterprise Pharo book). > I read "By default, Voyage works in instance mode". > If I run the example in instance mode, I get an error via the debugger. > > |repo anAssociation| > repo := VOMemoryRepository new. > anAssociation := #answer -> 42. > anAssociation save: repo. repo save: anAssociation :) cheers! Esteban > ==> "Instance of Association did not understand #save:" > > What am I doing wrong? > > -- > Dominique |
Thanks Esteban. I was fooled by the doc : "In instance mode, the first argument is always the repository on which to performed the operation"... Well, not really, but the object to store. Regards 2018-01-25 23:07 GMT+01:00 Esteban Lorenzano <[hidden email]>:
Dominique |
yeah, it should say: the receiver.
|
Can you do a pull request to update the book?
Or do we let rot the documentation? Is the same sentence present in the Voyage booklet? Stef On Thu, Jan 25, 2018 at 11:27 PM, Esteban Lorenzano <[hidden email]> wrote: > > > On 25 Jan 2018, at 23:24, Dominique Dartois <[hidden email]> wrote: > > Thanks Esteban. > I was fooled by the doc : "In instance mode, the first argument is always > the repository on which to performed the operation"... > Well, not really, but the object to store. > > > yeah, it should say: the receiver. > > > Regards > > 2018-01-25 23:07 GMT+01:00 Esteban Lorenzano <[hidden email]>: >> >> >> >> > On 25 Jan 2018, at 23:03, Dominique Dartois <[hidden email]> wrote: >> > >> > Hello all. >> > >> > I'am learning to use Voyage by trying the examples in the Voyage doc (in >> > the Enterprise Pharo book). >> > I read "By default, Voyage works in instance mode". >> > If I run the example in instance mode, I get an error via the debugger. >> > >> > |repo anAssociation| >> > repo := VOMemoryRepository new. >> > anAssociation := #answer -> 42. >> > anAssociation save: repo. >> >> repo save: anAssociation :) >> >> cheers! >> Esteban >> >> > ==> "Instance of Association did not understand #save:" >> > >> > What am I doing wrong? >> > >> > -- >> > Dominique >> >> > > > > -- > Dominique > > |
Free forum by Nabble | Edit this page |