#UI_ENHANCEMENT by exept draft
authorClaus Gittinger <cg@exept.de>
Tue, 30 Jul 2019 11:54:55 +0200
changeset 3742 e62cdf622315
parent 3741 373454460851
child 3743 dd619d41915a
#UI_ENHANCEMENT by exept class: MethodFinderWindow changed: #receiverEditorContents allow c-style integers
MethodFinderWindow.st
--- a/MethodFinderWindow.st	Sun Jul 28 01:09:11 2019 +0200
+++ b/MethodFinderWindow.st	Tue Jul 30 11:54:55 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  Copyright (C) Original Authors (Kaehler, Scott Wallace and Dan Ingalls)
  Copyright (C) 2001 eXept Software AG
@@ -1909,6 +1911,18 @@
     |aCleanedReceiverString compiledReceiver|
 
     aCleanedReceiverString := self cleanInputs:(receiverEditor contents).
+    "/ allow C-style integers
+    (aCleanedReceiverString startsWith:'0b') ifTrue:[
+        aCleanedReceiverString := '2r',(aCleanedReceiverString withoutPrefix:'0b')
+    ] ifFalse:[
+        (aCleanedReceiverString startsWith:'0x') ifTrue:[
+            aCleanedReceiverString := '16r',(aCleanedReceiverString withoutPrefix:'0x')
+        ] ifFalse:[
+            (aCleanedReceiverString startsWith:'0o') ifTrue:[
+                aCleanedReceiverString := '8r',(aCleanedReceiverString withoutPrefix:'0o')
+            ].
+        ].
+    ].
     compiledReceiver := Compiler evaluate:aCleanedReceiverString.
     ((self isExpression:aCleanedReceiverString) or:[ compiledReceiver isNil ]) ifTrue:[
         aCleanedReceiverString := compiledReceiver printString