1-way #become: ?

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

1-way #become: ?

Sophie424
#become: apparently (effectively) swaps object ids.

Is there anything like
    x oneWayBecome: y
that would pass this test:

testOneWayBecome: x to: y
    | a b |
    a := x.
    b := y.
    x oneWayBecome: y.
    self assert: [x == y].
    self assert: [a == y].
    self assert: [b == y].

(Not related to my earlier collection empty question)

Thanks - Sophie



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

Re: 1-way #become: ?

Michael van der Gulik-2
See >>becomeForward:

Gulik.

On Feb 19, 2008 4:59 PM, itsme213 <[hidden email]> wrote:
#become: apparently (effectively) swaps object ids.

Is there anything like
   x oneWayBecome: y
that would pass this test:

testOneWayBecome: x to: y
   | a b |
   a := x.
   b := y.
   x oneWayBecome: y.
   self assert: [x == y].
   self assert: [a == y].
   self assert: [b == y].

(Not related to my earlier collection empty question)

Thanks - Sophie



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



--
http://people.squeakfoundation.org/person/mikevdg
http://gulik.pbwiki.com/
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners