HierarchicalListView.st
changeset 1624 1062c88430f9
parent 1597 9a9abffb7911
child 1632 d1479a31986e
--- a/HierarchicalListView.st	Fri Dec 03 03:34:03 1999 +0100
+++ b/HierarchicalListView.st	Fri Dec 03 03:39:21 1999 +0100
@@ -121,7 +121,7 @@
     <resource: #fileImage>
 
     ^ Icon constantNamed:#plus
-             ifAbsentPut:[Image fromFile:('xpmBitmaps/plus.xpm')]
+             ifAbsentPut:[Smalltalk bitmapFromFileNamed:'plus.xpm' forClass:self]
 
 
 !
@@ -132,7 +132,7 @@
     <resource: #fileImage>
 
     ^ Icon constantNamed:#directory
-             ifAbsentPut:[Image fromFile:('xpmBitmaps/document_images/tiny_yellow_dir.xpm')]
+             ifAbsentPut:[Smalltalk bitmapFromFileNamed:'dir.xpm' forClass:self]
 
 !
 
@@ -142,7 +142,7 @@
     <resource: #fileImage>
 
     ^ Icon constantNamed:#plainFile
-             ifAbsentPut:[Image fromFile:('xpmBitmaps/document_images/tiny_file_plain.xpm')]
+             ifAbsentPut:[Smalltalk bitmapFromFileNamed:'file_plain.xpm' forClass:self]
 
 !
 
@@ -152,7 +152,7 @@
     <resource: #fileImage>
 
     ^ Icon constantNamed:#directoryOpened
-             ifAbsentPut:[Image fromFile:('xpmBitmaps/document_images/tiny_yellow_dir_open.xpm')]
+             ifAbsentPut:[Smalltalk bitmapFromFileNamed:'dir_open.xpm' forClass:self]
 
 !
 
@@ -162,7 +162,7 @@
     <resource: #fileImage>
 
     ^ Icon constantNamed:#minus
-             ifAbsentPut:[Image fromFile:('xpmBitmaps/minus.xpm')]
+             ifAbsentPut:[Smalltalk bitmapFromFileNamed:'minus.xpm' forClass:self]
 
 ! !
 
@@ -733,9 +733,13 @@
     imageWidth     := 4.
 
     icons keysAndValuesDo:[:aKey :anImage|
-        image := self imageOnDevice:anImage.
-        icons at:aKey put:image.
-        imageWidth := image width  max:imageWidth.
+        anImage isNil ifTrue:[
+            ('HierachicalListView [warning]: missing image: ' , aKey) errorPrintCR.
+        ] ifFalse:[
+            image := self imageOnDevice:anImage.
+            icons at:aKey put:image.
+            imageWidth := image width max:imageWidth.
+        ]
     ].
     alignTextRightX := imageWidth + 20.
 
@@ -994,5 +998,5 @@
 !HierarchicalListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.18 1999-10-18 15:42:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.19 1999-12-03 02:39:21 cg Exp $'
 ! !