BogusSnapshotResource >> restoreMethod: ref using deprecated and: and:

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

BogusSnapshotResource >> restoreMethod: ref using deprecated and: and:

Mariano Martinez Peck
Hi Lukas. BogusSnapshotResource >> restoreMethod: ref    is using the and: and: that was just deprecated in Pharo 1.1.

Just replacing it by this I think should work:

restoreMethod: ref
    | definition |
    definition := snapshot definitions detect:
            [ :ea |
            ea isMethodDefinition and: [ (ea className = ref classSymbol )
                and: [ ea selector = ref methodSymbol ] ]]
        ifNone: [ ^ self removeMethod: ref ].
    definition load


cheers

mariano

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: BogusSnapshotResource >> restoreMethod: ref using deprecated and: and:

Lukas Renggli
Fixed in:

  Name: BogusInfo-lr.22
  Author: lr
  Time: 2 July 2010, 5:58:02 pm
  UUID: cad9f459-36e1-4859-82a6-1ba6bcaad1c3
  Ancestors: BogusInfo-lr.21
  Dependencies: Bogus-cwp.18, BogusExt-cwp.4

  - refactored #and:and: callers

2010/7/2 Mariano Martinez Peck <[hidden email]>:

> Hi Lukas. BogusSnapshotResource >> restoreMethod: ref    is using the and:
> and: that was just deprecated in Pharo 1.1.
>
> Just replacing it by this I think should work:
>
> restoreMethod: ref
>     | definition |
>     definition := snapshot definitions detect:
>             [ :ea |
>             ea isMethodDefinition and: [ (ea className = ref classSymbol )
>                 and: [ ea selector = ref methodSymbol ] ]]
>         ifNone: [ ^ self removeMethod: ref ].
>     definition load
>
>
> cheers
>
> mariano
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: BogusSnapshotResource >> restoreMethod: ref using deprecated and: and:

Mariano Martinez Peck
thanks lukas :)

Mariano

On Fri, Jul 2, 2010 at 5:58 PM, Lukas Renggli <[hidden email]> wrote:
Fixed in:

 Name: BogusInfo-lr.22
 Author: lr
 Time: 2 July 2010, 5:58:02 pm
 UUID: cad9f459-36e1-4859-82a6-1ba6bcaad1c3
 Ancestors: BogusInfo-lr.21
 Dependencies: Bogus-cwp.18, BogusExt-cwp.4

 - refactored #and:and: callers

2010/7/2 Mariano Martinez Peck <[hidden email]>:
> Hi Lukas. BogusSnapshotResource >> restoreMethod: ref    is using the and:
> and: that was just deprecated in Pharo 1.1.
>
> Just replacing it by this I think should work:
>
> restoreMethod: ref
>     | definition |
>     definition := snapshot definitions detect:
>             [ :ea |
>             ea isMethodDefinition and: [ (ea className = ref classSymbol )
>                 and: [ ea selector = ref methodSymbol ] ]]
>         ifNone: [ ^ self removeMethod: ref ].
>     definition load
>
>
> cheers
>
> mariano
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project