changed: #cmd_use:
authorClaus Gittinger <cg@exept.de>
Tue, 06 Dec 2011 13:38:10 +0100
changeset 13852 4bdc4f1dc3e3
parent 13851 5ab434e0a636
child 13853 ad3ea3b6a541
changed: #cmd_use:
ReadEvalPrintLoop.st
--- a/ReadEvalPrintLoop.st	Tue Dec 06 13:28:53 2011 +0100
+++ b/ReadEvalPrintLoop.st	Tue Dec 06 13:38:10 2011 +0100
@@ -242,11 +242,20 @@
 !
 
 cmd_use:lineStream
-    |pkg|
+    |pkg ok|
 
     lineStream skipSeparators.
     pkg := lineStream upToEnd withoutSeparators.
-    Smalltalk loadPackage:pkg
+    (ok := Smalltalk loadPackage:pkg) ifFalse:[
+        "/ allow for some shortcuts...
+        (pkg includes:$:) ifFalse:[
+            "/ try stx standard package
+            ok := Smalltalk loadPackage:('stx:',pkg)
+        ].
+    ].
+    ok ifFalse:[
+        ('Failed to load package: ',pkg) infoPrintCR.
+    ].
 
     "Created: / 07-12-2006 / 19:07:56 / cg"
 !
@@ -377,9 +386,9 @@
 !ReadEvalPrintLoop class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ReadEvalPrintLoop.st,v 1.29 2011-10-06 19:02:31 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ReadEvalPrintLoop.st,v 1.30 2011-12-06 12:38:10 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ReadEvalPrintLoop.st,v 1.29 2011-10-06 19:02:31 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ReadEvalPrintLoop.st,v 1.30 2011-12-06 12:38:10 cg Exp $'
 ! !