Pharo 3.0 Issue with instance variables

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

Pharo 3.0 Issue with instance variables

Pablo Frias
Hi all,

We are teaching Smalltalk at the Universtity of Cordoba, Argentina with Pharo, but we are having the following issue.
Sometimes y in different workstations, we notice that when instantiating an object and setting values using the accesors methods, the values are added in the object, but in different instance variables.

For example:

|a|

a := MyPersonObject new.
a age: 35.
a name: 'Person name'.

But when using the object, we notice that 35 has been saved to name and the string to age.

Is that a known issue? Unfortunately we haven't tested Pharo 5.0 yet, so I cannot tell you if it is already fixed.

Our current image is: Pharo 3.0 on Windows.

Thanks in advance,
Pablo
Reply | Threaded
Open this post in threaded view
|

Re: Pharo 3.0 Issue with instance variables

Nicolai Hess-3-2


2016-09-22 15:58 GMT+02:00 Pablo Frias <[hidden email]>:
Hi all,

We are teaching Smalltalk at the Universtity of Cordoba, Argentina with Pharo, but we are having the following issue.
Sometimes y in different workstations, we notice that when instantiating an object and setting values using the accesors methods, the values are added in the object, but in different instance variables.

For example:

|a|

a := MyPersonObject new.
a age: 35.
a name: 'Person name'.

But when using the object, we notice that 35 has been saved to name and the string to age.

Is that a known issue? Unfortunately we haven't tested Pharo 5.0 yet, so I cannot tell you if it is already fixed.

Our current image is: Pharo 3.0 on Windows.

Thanks in advance,
Pablo

Hi Pablo,

I remember an issue with instance variable ordering. Applying some refactorings from Nautilus, like generate accessor/rename remove or add instance variables, will reorder (sort)
the instance variables!
This was fixed for 4.0

nicolai
 

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 3.0 Issue with instance variables

Ben Coman
In reply to this post by Pablo Frias
On Thu, Sep 22, 2016 at 9:58 PM, Pablo Frias <[hidden email]> wrote:

> Hi all,
>
> We are teaching Smalltalk at the Universtity of Cordoba, Argentina with
> Pharo, but we are having the following issue.
> Sometimes y in different workstations, we notice that when instantiating an
> object and setting values using the accesors methods, the values are added
> in the object, but in different instance variables.
>
> For example:
>
> |a|
>
> a := MyPersonObject new.
> a age: 35.
> a name: 'Person name'.
>
> But when using the object, we notice that 35 has been saved to name and the
> string to age.
>
> Is that a known issue? Unfortunately we haven't tested Pharo 5.0 yet, so I
> cannot tell you if it is already fixed.
>
> Our current image is: Pharo 3.0 on Windows.
>
> Thanks in advance,
> Pablo

Are they values really going into the wrong instance variables, or is
it just the display of them getting mixed up in the inspector?   What
does...  "a age"    return?

Perhaps try a   "Smalltalk recompile"  and open a new Nautilus window

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 3.0 Issue with instance variables

stepharo
In reply to this post by Pablo Frias
Hi Pablo

This is great to know that Cordoba is teaching OOP in Pharo. Let us know
how we can help you.

Why don't you move to Pharo 50 because we fixed a lot of issues in 3 years.

And the mooc

     http://mooc.pharo.org (which has been evaluated to be worth 180 000
Euros - yes three salaries for some months and professional videos    
     processing and translation) is based on Pharo 50.

So you get 30 live videos for free.

Not counting all the lectures.

Stef


Le 22/9/16 à 16:58, Pablo Frias a écrit :

> Hi all,
>
> We are teaching Smalltalk at the Universtity of Cordoba, Argentina
> with Pharo, but we are having the following issue.
> Sometimes y in different workstations, we notice that when
> instantiating an object and setting values using the accesors methods,
> the values are added in the object, but in different instance variables.
>
> For example:
>
> |a|
>
> a := MyPersonObject new.
> a age: 35.
> a name: 'Person name'.
>
> But when using the object, we notice that 35 has been saved to name
> and the string to age.
>
> Is that a known issue? Unfortunately we haven't tested Pharo 5.0 yet,
> so I cannot tell you if it is already fixed.
>
> Our current image is: Pharo 3.0 on Windows.
>
> Thanks in advance,
> Pablo