Voyage and Instance Mode

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

Voyage and Instance Mode

Dominique Dartois-4
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
Reply | Threaded
Open this post in threaded view
|

Re: Voyage and Instance Mode

EstebanLM


> 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


Reply | Threaded
Open this post in threaded view
|

Re: Voyage and Instance Mode

Dominique Dartois-4
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]>:


> 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
Reply | Threaded
Open this post in threaded view
|

Re: Voyage and Instance Mode

EstebanLM


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

Reply | Threaded
Open this post in threaded view
|

Re: Voyage and Instance Mode

Stephane Ducasse-3
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
>
>