((self directoryName = '') and: [self fileSpec = '']) ifTrue: [something] Note the receiver of #and: is NOT a block
----------------- Benoit St-Jean Yahoo! Messenger: bstjean A standpoint is an intellectual horizon of radius zero. (Albert Einstein) ________________________________ From: Jeff Gray <[email protected]> To: [email protected] Sent: Mon, March 28, 2011 10:23:03 PM Subject: [Pharo-users] and: help I have a line of code that goes: ([self directoryName = ''] and: [self fileSpec = '']) ifTrue: [..... and it throws an error "NonBooleanReceiver: proceed for truth". The directoryName and fileSpec methods both ititialise to '' (empty string) if nil. I couldn't see what the issue was so I played in a workspace and evaluated: [true] and: [true] which gave me the same error. I'm in Pharo 1.1.1 Is my boolean structure wrong or is this a bug? Is there a better way for me to write the code? -- View this message in context: http://forum.world.st/and-help-tp3413554p3413554.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
