On 25 July 2013 08:46, commits@source.squeak.org wrote:
Frank Shearar uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-fbs.142.mcz
==================== Summary ====================
Name: Network-fbs.142 Author: fbs Time: 25 July 2013, 8:46:43.161 am UUID: 6e2a56e3-7200-e843-976b-70b6a274d722 Ancestors: Network-fbs.141
SmalltalkImage current -> Smalltalk.
=============== Diff against Network-fbs.141 ===============
Item was changed: ----- Method: InternetConfiguration class>>shutDown (in category 'system startup') ----- shutDown
(Smalltalk platformName = 'Mac OS') ifTrue: [
(SmalltalkImage current platformName = 'Mac OS') ifTrue: [ HTTPSocket stopUsingProxyServer]
!
Item was changed: ----- Method: InternetConfiguration class>>startUp (in category 'system startup') ----- startUp
(Smalltalk platformName = 'Mac OS') ifTrue: [
(SmalltalkImage current platformName = 'Mac OS') ifTrue: [ self useHTTPProxy ifTrue: [ (self getHTTPProxyHost findTokens: ':') ifNotEmpty: [:p | HTTPSocket useProxyServerNamed: p first port: p second asInteger]]]!
Checking for strings is... not the best thing you could do. I'd _much_ rather see something like "Smalltalk platform isMacOS" or similar.
frank
On 25-07-2013, at 12:49 AM, Frank Shearar frank.shearar@gmail.com wrote:
startUp
(Smalltalk platformName = 'Mac OS') ifTrue: [
(SmalltalkImage current platformName = 'Mac OS') ifTrue: [ self useHTTPProxy ifTrue: [ (self getHTTPProxyHost findTokens: ':') ifNotEmpty: [:p | HTTPSocket useProxyServerNamed: p first port: p second asInteger]]]!
Checking for strings is... not the best thing you could do. I'd _much_ rather see something like "Smalltalk platform isMacOS" or similar.
Definitely. But I'd suggest "Smalltalk platformIsMacOSX" so as to avoid somebody coming along and implementing a class SmalltalkPlatformDescription that is returned by #platform and responds to isMacOSX. Though a platform info class isn't a terrible idea as such, so long as it isn't spread all over the system. Like SystemNavigation - it's not a terrible thing to put allBehaviorsDo: etc into a class, so long as the main access is via something memorable - like Smalltalk allBehavioursDo:
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: SLTMDL: Shift Left, Test Mask and Dim the Lights
I used to think trying to "categorize" things into Smalltalk vm thisOrThat and Smalltalk platform thisOrThat, etc. was a good idea until Andreas' argument (IIRC) opened my eyes and convinced me otherwise.
IIRC, it was that it creates, for the user, an unnecessary mental exercise in language-parsing semantics every time one is required to access through them. Is #xyz part of the "vm" or part of the "platform"? Should I look it up or risk a bug? For users engrossed in the world of Smalltalk, the system-variables external to that world do not need to categorized. Just, "Smalltalk" is simpler.
On Thu, Jul 25, 2013 at 2:49 AM, Frank Shearar frank.shearar@gmail.com wrote:
On 25 July 2013 08:46, commits@source.squeak.org wrote:
Frank Shearar uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-fbs.142.mcz
==================== Summary ====================
Name: Network-fbs.142 Author: fbs Time: 25 July 2013, 8:46:43.161 am UUID: 6e2a56e3-7200-e843-976b-70b6a274d722 Ancestors: Network-fbs.141
SmalltalkImage current -> Smalltalk.
=============== Diff against Network-fbs.141 ===============
Item was changed: ----- Method: InternetConfiguration class>>shutDown (in category 'system startup') ----- shutDown
(Smalltalk platformName = 'Mac OS') ifTrue: [
(SmalltalkImage current platformName = 'Mac OS') ifTrue: [ HTTPSocket stopUsingProxyServer]
!
Item was changed: ----- Method: InternetConfiguration class>>startUp (in category 'system startup') ----- startUp
(Smalltalk platformName = 'Mac OS') ifTrue: [
(SmalltalkImage current platformName = 'Mac OS') ifTrue: [ self useHTTPProxy ifTrue: [ (self getHTTPProxyHost findTokens: ':') ifNotEmpty: [:p | HTTPSocket useProxyServerNamed: p first port: p second asInteger]]]!
Checking for strings is... not the best thing you could do. I'd _much_ rather see something like "Smalltalk platform isMacOS" or similar.
frank
squeak-dev@lists.squeakfoundation.org