#UI_ENHANCEMENT by exept
authorClaus Gittinger <cg@exept.de>
Tue, 30 Jul 2019 11:54:55 +0200
changeset 3742e62cdf622315
parent 3741 373454460851
child 3743 dd619d41915a
#UI_ENHANCEMENT by exept
class: MethodFinderWindow
changed: #receiverEditorContents
allow c-style integers
MethodFinderWindow.st
     1.1 --- a/MethodFinderWindow.st	Sun Jul 28 01:09:11 2019 +0200
     1.2 +++ b/MethodFinderWindow.st	Tue Jul 30 11:54:55 2019 +0200
     1.3 @@ -1,3 +1,5 @@
     1.4 +"{ Encoding: utf8 }"
     1.5 +
     1.6  "
     1.7   Copyright (C) Original Authors (Kaehler, Scott Wallace and Dan Ingalls)
     1.8   Copyright (C) 2001 eXept Software AG
     1.9 @@ -1909,6 +1911,18 @@
    1.10      |aCleanedReceiverString compiledReceiver|
    1.11  
    1.12      aCleanedReceiverString := self cleanInputs:(receiverEditor contents).
    1.13 +    "/ allow C-style integers
    1.14 +    (aCleanedReceiverString startsWith:'0b') ifTrue:[
    1.15 +        aCleanedReceiverString := '2r',(aCleanedReceiverString withoutPrefix:'0b')
    1.16 +    ] ifFalse:[
    1.17 +        (aCleanedReceiverString startsWith:'0x') ifTrue:[
    1.18 +            aCleanedReceiverString := '16r',(aCleanedReceiverString withoutPrefix:'0x')
    1.19 +        ] ifFalse:[
    1.20 +            (aCleanedReceiverString startsWith:'0o') ifTrue:[
    1.21 +                aCleanedReceiverString := '8r',(aCleanedReceiverString withoutPrefix:'0o')
    1.22 +            ].
    1.23 +        ].
    1.24 +    ].
    1.25      compiledReceiver := Compiler evaluate:aCleanedReceiverString.
    1.26      ((self isExpression:aCleanedReceiverString) or:[ compiledReceiver isNil ]) ifTrue:[
    1.27          aCleanedReceiverString := compiledReceiver printString