--- a/Method.st Mon Jan 05 14:02:13 1998 +0100
+++ b/Method.st Mon Jan 05 14:03:10 1998 +0100
@@ -366,26 +366,6 @@
"Created: 16.1.1997 / 01:25:52 / cg"
!
-numArgs
- "return the number of arguments, the method expects."
-
-%{ /* NOCONTEXT */
- /* made this a primitive to get define in stc.h */
-
- RETURN (__MKSMALLINT((__intVal(__INST(flags)) & F_NARGS) >> F_NARGSHIFT));
-%}.
- "
- The old implementation simply counted the arguments from
- the methods source - new versions include this information
- in the flag instVar, for more security in #perform:
- "
-
- "
- (Method compiledMethodAt:#source) numArgs
- (Method compiledMethodAt:#source:) numArgs
- "
-!
-
numberOfMethodArgs
"return the number of arguments, the method expects.
This method is left for backward compatibility - use #numArgs."
@@ -1617,18 +1597,18 @@
((self resourceType = #image) or: [self resourceType = #fileImage])
ifTrue:
[
- ^self who methodClass soleInstance perform: self who methodSelector
+ ^self who methodClass soleInstance perform: self who methodSelector
]
ifFalse:
[
- |icon|
- (icon := aGC registeredImageAt: self resourceType) isNil
- ifTrue:
- [
- aGC registerImage: (self class perform: (self resourceType, 'Icon') asSymbol) key: self resourceType.
- icon := aGC registeredImageAt: self resourceType.
- ].
- ^icon
+ |icon|
+ (icon := aGC registeredImageAt: self resourceType) isNil
+ ifTrue:
+ [
+ aGC registerImage: (self class perform: (self resourceType, 'Icon') asSymbol) key: self resourceType.
+ icon := aGC registeredImageAt: self resourceType.
+ ].
+ ^icon
]
!
@@ -2124,15 +2104,15 @@
self hasResource ifFalse:[^ nil].
self resources keysAndValuesDo:[:key :val |
- (#(
- canvas
- image
- fileImage
- menu
- ) includes:key) ifTrue:[
- ^ key
- ]
- ].
+ (#(
+ canvas
+ image
+ fileImage
+ menu
+ ) includes:key) ifTrue:[
+ ^ key
+ ]
+ ].
^ nil
"Created: / 27.10.1997 / 14:10:58 / cg"
@@ -2149,17 +2129,17 @@
src := self source.
src isNil ifTrue:[
- ^ nil "/ actually: dont know
+ ^ nil "/ actually: dont know
].
(src findString:'resource:') == 0 ifTrue:[
- ^ nil "/ actually: error
+ ^ nil "/ actually: error
].
parser := Parser
- parseMethod:src
- in:nil
- ignoreErrors:true
- ignoreWarnings:true.
+ parseMethod:src
+ in:nil
+ ignoreErrors:true
+ ignoreWarnings:true.
^ parser primitiveResources.
@@ -2531,6 +2511,6 @@
!Method class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.144 1997-12-08 20:32:40 tz Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.145 1998-01-05 13:03:10 cg Exp $'
! !
Method initialize!