Login  Register

Smalltalk>>#platformName

Posted by Chris Muller-4 on Oct 22, 2019; 1:10am
URL: https://forum.world.st/Smalltalk-platformName-tp5105797.html

I was trying to find out all possible values of this message.  Browsing senders reveals a need to factor this out into a first-class SqueakPlatform -- we have way too many places which employ switch statements to determine what to do:

    Smalltalk platformName = "Mac OS" 
       ifTrue: 
          [ #('/System/Library/Fonts' '/Library/Fonts') do: [:fontDir | aBlock value: fontDir]. ]

Others check for "Win32", I'm not sure what #platformName is answering on 64-bit VM on Windows these days, could someone running Windows please tell me?

Still others check for "Risc OS" or "unix".  So, the full list I have so far is:

    unix
    Win32
    Mac OS
    Risc OS

If you know of any others, please let me know.

 - Chris