Method.st
changeset 11394 c44ffa4977ea
parent 11146 553e658691d2
child 11428 e002708d8caf
--- a/Method.st	Sun Dec 07 11:45:41 2008 +0100
+++ b/Method.st	Sun Dec 07 21:30:01 2008 +0100
@@ -1936,6 +1936,18 @@
     ^ false
 !
 
+hasResource:aSymbol
+    "return true if the method had a <resource> definition for aSymbol."
+
+    ^ self hasResource and:[ self resources includesKey:aSymbol ]
+
+    "
+     Method allInstancesDo:[:m |
+        (m hasResource:#image) ifTrue:[self halt]
+     ].
+    "
+!
+
 homeMethod
     "for common protocol with blocks: if the receiver is a method,
      return the receiver; otherwise, if its a block, return its home
@@ -2838,7 +2850,7 @@
 !Method class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.316 2008-09-03 08:58:19 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.317 2008-12-07 20:30:01 cg Exp $'
 ! !
 
 Method initialize!