[Cuis] Determining dialect programmatically

Juan Vuletich juan at jvuletich.org
Sun Jan 27 09:22:45 CST 2013


Hi Casey,

Casey Ransberger wrote:
> I'm thinking I might want to do some stuff conditionally based on 
> platform, is the best way to find out whether I'm on Pharo/Squeak/Cuis?
>
> (SystemVersion current version beginsWith: 'Cuis') ifTrue: [ #foo ]
> (SystemVersion current version beginsWith: 'Squeak') ifTrue: [ #bar ]
> (SystemVersion current version beginsWith: 'Pharo') ifTrue: [ #baz ]
>
> -- 
> Casey Ransberger

This sounds right to me. But if you want to add #isCuis, #isSqueak, 
#isPharo, etc to SystemDictionary or some base class, that would be ok 
too. You'd need to convince the Squeak and Pharo folks to add them too. 
It looks like they would agree.

Cheers,
Juan Vuletich




More information about the Cuis mailing list