DropObject.st
changeset 1709 fc33be8aaa9c
parent 1623 233a4e389e35
child 1784 67f412dd5926
--- a/DropObject.st	Fri Feb 28 18:42:42 2003 +0100
+++ b/DropObject.st	Sun Mar 02 19:34:01 2003 +0100
@@ -396,17 +396,16 @@
 !
 
 isPrintable
-    "returns false if file contains non printable characters
-    "
+    "returns false if file contains nonprintable characters"
+
     |stream buff size|
 
     isPrintable isNil ifTrue:[
         isPrintable := false.
 
         (info isNil or:[self isDirectory]) ifFalse:[
-            stream := FileStream readonlyFileNamed:(theObject pathName).
-
-            stream isNil ifFalse:[
+            stream := theObject readStreamOrNil.
+            stream notNil ifTrue:[
                 buff := String new:300.
                 size := stream nextBytes:300 into:buff.
                 stream close.
@@ -482,5 +481,5 @@
 !DropObject class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/DropObject.st,v 1.12 2002-09-17 19:33:09 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/DropObject.st,v 1.13 2003-03-02 18:34:01 stefan Exp $'
 ! !