On Fri, Sep 03, 2010 at 01:03:31PM +0200, Cyrille Delaunay wrote:
> Hello,
> 
> I would suggest to replace the two methods
> --------------------------------------------------------------
> OSPRocess class >> platformName
> "After Squeak version 3.6, #platformName was moved to SmalltalkImage "
> 
> ^ ((Smalltalk classNamed: 'SmalltalkImage')
> ifNil: [^ Smalltalk platformName]) current platformName
> 
> OSPRocess class >> osVersion
> "After Squeak version 3.6, #osVersion was moved to SmalltalkImage "
> 
> ^ ((Smalltalk classNamed: 'SmalltalkImage')
> ifNil: [^ Smalltalk osVersion]) current osVersion
> 
> --------------------------------------------------------------
> by:
>  -------------------------------------------------------------
> OSProcess class >> platformName
>  ^ ((Smalltalk classNamed: 'OSPlatform')
> ifNil: [
> (Smalltalk classNamed: 'SmalltalkImage') current
> ifNil: [^ Smalltalk platformName]]) platformName
> 
> OSProcess class >> osVersion
>  ^ ((Smalltalk classNamed: 'OSPlatform')
> ifNil: [
> (Smalltalk classNamed: 'SmalltalkImage') current
> ifNil: [^ Smalltalk osVersion]]) osVersion
> ------------------------------------------------------------
> 
> to avoid deprecation messages when using it in Pharo 1.2. Does it looks
> good?  I'm not able to publish on the squeaksource repository

This failed on the first Pharo image that I tried, which was a
Pharo-1.1-11400-rc2dev10.06.1 image. I think this is the subject
of some recent refactoring, so I'm not sure if it's safe to use
it yet (will somebody try to load OSProcess in one of the images
that has OSPlatform but that does not yet have the #platformName
refactoring?).

I expect that there are several versions of Pharo in general
circulation, so can someone give me some guidance as to whether
it is safe to code for "OSPlatform current platformName" as the
expected idiom on Pharo, or should we wait a while and live with
the deprecation warnings?

Thanks,

Dave


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

Reply via email to