handle non-existent icons case
authorClaus Gittinger <cg@exept.de>
Fri, 18 Apr 1997 12:47:45 +0200
changeset 1144 6bd7e0d7ca07
parent 1143 0707461e582a
child 1145 0464625bbdbb
handle non-existent icons case
FBrowser.st
FileBrowser.st
--- a/FBrowser.st	Fri Apr 18 10:56:00 1997 +0200
+++ b/FBrowser.st	Fri Apr 18 12:47:45 1997 +0200
@@ -2727,12 +2727,15 @@
     ].
     i := icons at:#directory ifAbsent:nil.
     i isNil ifTrue:[
-        icons at:#directory put:((i := self class directoryIcon) on:device).
+        i := self class directoryIcon.
+        i notNil ifTrue:[
+            icons at:#directory put:(i on:device).
+        ]
     ].
     ^ i
 
     "Created: 16.4.1997 / 14:00:26 / cg"
-    "Modified: 17.4.1997 / 01:32:36 / cg"
+    "Modified: 18.4.1997 / 12:46:18 / cg"
 !
 
 directoryLinkIcon
@@ -2745,12 +2748,15 @@
     ].
     i := icons at:#directoryLink ifAbsent:nil.
     i isNil ifTrue:[
-        icons at:#directoryLink put:((i := self class directoryLinkIcon) on:device).
+        i := self class directoryLinkIcon.
+        i notNil ifTrue:[
+            icons at:#directoryLink put:(i on:device).
+        ]
     ].
     ^ i
 
-    "Modified: 17.4.1997 / 01:32:36 / cg"
     "Created: 17.4.1997 / 02:29:27 / cg"
+    "Modified: 18.4.1997 / 12:46:32 / cg"
 !
 
 fileIcon
@@ -2763,12 +2769,15 @@
     ].
     i := icons at:#file ifAbsent:nil.
     i isNil ifTrue:[
-        icons at:#file put:((i := self class fileIcon) on:device).
+        i := self class fileIcon.
+        i notNil ifTrue:[
+            icons at:#file put:(i on:device).
+        ]
     ].
     ^ i
 
     "Created: 16.4.1997 / 14:00:26 / cg"
-    "Modified: 17.4.1997 / 01:32:47 / cg"
+    "Modified: 18.4.1997 / 12:46:44 / cg"
 !
 
 fileLinkIcon
@@ -2781,12 +2790,15 @@
     ].
     i := icons at:#fileLink ifAbsent:nil.
     i isNil ifTrue:[
-        icons at:#fileLink put:((i := self class fileLinkIcon) on:device).
+        i := self class fileLinkIcon.
+        i notNil ifTrue:[
+            icons at:#fileLink put:(i on:device).
+        ]
     ].
     ^ i
 
-    "Modified: 17.4.1997 / 01:32:47 / cg"
     "Created: 17.4.1997 / 02:32:09 / cg"
+    "Modified: 18.4.1997 / 12:46:58 / cg"
 !
 
 iconForFile:aFilenameString
@@ -2829,12 +2841,15 @@
     ].
     i := icons at:#image ifAbsent:nil.
     i isNil ifTrue:[
-        icons at:#image put:((i := self class imageFileIcon) on:device).
+        i := self class imageFileIcon.
+        i notNil ifTrue:[
+            icons at:#image put:(i on:device).
+        ]
     ].
     ^ i
 
-    "Modified: 17.4.1997 / 01:32:47 / cg"
     "Created: 17.4.1997 / 04:01:40 / cg"
+    "Modified: 18.4.1997 / 12:47:11 / cg"
 !
 
 updateCurrentDirectory
@@ -3316,5 +3331,5 @@
 !FileBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/FBrowser.st,v 1.141 1997-04-17 17:27:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/FBrowser.st,v 1.142 1997-04-18 10:47:45 cg Exp $'
 ! !
--- a/FileBrowser.st	Fri Apr 18 10:56:00 1997 +0200
+++ b/FileBrowser.st	Fri Apr 18 12:47:45 1997 +0200
@@ -2727,12 +2727,15 @@
     ].
     i := icons at:#directory ifAbsent:nil.
     i isNil ifTrue:[
-        icons at:#directory put:((i := self class directoryIcon) on:device).
+        i := self class directoryIcon.
+        i notNil ifTrue:[
+            icons at:#directory put:(i on:device).
+        ]
     ].
     ^ i
 
     "Created: 16.4.1997 / 14:00:26 / cg"
-    "Modified: 17.4.1997 / 01:32:36 / cg"
+    "Modified: 18.4.1997 / 12:46:18 / cg"
 !
 
 directoryLinkIcon
@@ -2745,12 +2748,15 @@
     ].
     i := icons at:#directoryLink ifAbsent:nil.
     i isNil ifTrue:[
-        icons at:#directoryLink put:((i := self class directoryLinkIcon) on:device).
+        i := self class directoryLinkIcon.
+        i notNil ifTrue:[
+            icons at:#directoryLink put:(i on:device).
+        ]
     ].
     ^ i
 
-    "Modified: 17.4.1997 / 01:32:36 / cg"
     "Created: 17.4.1997 / 02:29:27 / cg"
+    "Modified: 18.4.1997 / 12:46:32 / cg"
 !
 
 fileIcon
@@ -2763,12 +2769,15 @@
     ].
     i := icons at:#file ifAbsent:nil.
     i isNil ifTrue:[
-        icons at:#file put:((i := self class fileIcon) on:device).
+        i := self class fileIcon.
+        i notNil ifTrue:[
+            icons at:#file put:(i on:device).
+        ]
     ].
     ^ i
 
     "Created: 16.4.1997 / 14:00:26 / cg"
-    "Modified: 17.4.1997 / 01:32:47 / cg"
+    "Modified: 18.4.1997 / 12:46:44 / cg"
 !
 
 fileLinkIcon
@@ -2781,12 +2790,15 @@
     ].
     i := icons at:#fileLink ifAbsent:nil.
     i isNil ifTrue:[
-        icons at:#fileLink put:((i := self class fileLinkIcon) on:device).
+        i := self class fileLinkIcon.
+        i notNil ifTrue:[
+            icons at:#fileLink put:(i on:device).
+        ]
     ].
     ^ i
 
-    "Modified: 17.4.1997 / 01:32:47 / cg"
     "Created: 17.4.1997 / 02:32:09 / cg"
+    "Modified: 18.4.1997 / 12:46:58 / cg"
 !
 
 iconForFile:aFilenameString
@@ -2829,12 +2841,15 @@
     ].
     i := icons at:#image ifAbsent:nil.
     i isNil ifTrue:[
-        icons at:#image put:((i := self class imageFileIcon) on:device).
+        i := self class imageFileIcon.
+        i notNil ifTrue:[
+            icons at:#image put:(i on:device).
+        ]
     ].
     ^ i
 
-    "Modified: 17.4.1997 / 01:32:47 / cg"
     "Created: 17.4.1997 / 04:01:40 / cg"
+    "Modified: 18.4.1997 / 12:47:11 / cg"
 !
 
 updateCurrentDirectory
@@ -3316,5 +3331,5 @@
 !FileBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.141 1997-04-17 17:27:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.142 1997-04-18 10:47:45 cg Exp $'
 ! !