code running error in 2.4 windows ver

Shane Hayes sphayes at ibm.net
Sun Aug 15 18:54:57 UTC 1999


I'm trying to run a method that appears to have its compiled definition
messed up. The code below is not factored well I admit.

The last line is where I have the problem. When I run this code,
everything seems to be fine until I hit the last method. When the code
in the block is valuated, I get a walkback "'NonBoolean
receiver--proceed for truth.'". When I go into the debugger, the code
fragment "error: 'I dont understand'" highlighted. When I put in a self
halt before this code, it seems to be trying to make a jump to some
other code that is expecting a Boolean reciever.

Anybody have any ideas on what may be happening?

initializeSCurveStartBoundary: startBoundary endBoundary: endBoundary
startNonFalse: startNonFalseValue endNoneTrueValue: endNoneTrueValue
flexPoint: flexTrueValue increase: anIncreaseBoolean
 | aMembershipCollection truthMember membershipValue scope range |
 (startBoundary > endBoundary
  or: [startBoundary > startNonFalseValue or: [endNoneTrueValue >
endBoundary]])
  ifTrue: [self error: 'range must be within scope'].
 self size > 0 ifTrue: [self initializeMembership].
 scope _ (startBoundary - endBoundary) abs asFloat.
 range _ (startNonFalseValue - endNoneTrueValue) abs asFloat.
 aMembershipCollection _ OrderedCollection new: self creationSize.
 aMembershipCollection add: (OSWTruthValue new membershipValue:
startBoundary;
   truthIndication: 0.0).
 2 to: self creationSize - 1 do:
  [:index |
  membershipValue _ startBoundary + (index / (self creationSize - 1) *
scope).
  truthMember _ OSWTruthValue new.
  truthMember membershipValue: membershipValue.
  membershipValue < startNonFalseValue
   ifTrue: [truthMember truthIndication: 0.0]
   ifFalse: [membershipValue < flexTrueValue
     ifTrue: [truthMember truthIndication: (2 * (membershipValue -
startNonFalseValue / range) raisedTo: 2) asFloat]
     ifFalse: [membershipValue < endNoneTrueValue
       ifTrue: [truthMember truthIndication: 1 - (2 * (membershipValue -
endNoneTrueValue / range) raisedTo: 2) asFloat]
       ifFalse: [truthMember truthIndication: 1.0]]].
  aMembershipCollection add: truthMember].
 aMembershipCollection add: (OSWTruthValue new membershipValue:
endBoundary;
   truthIndication: 1.0;
   yourself).
 self replaceMembershipWith: aMembershipCollection.
 anIncreaseBoolean ifFalse: [self error: 'I dont understand']





More information about the Squeak-dev mailing list