Update ringlibs/naturallib/common/naturalcommand.ring - Better Code (Faster) - Cache the list as an attribute in the class instead of using the right() function again many times.
@@ -139,11 +139,18 @@ class NaturalCommand
aAllKeywords + cKeyword
cCode = '
f1 = func {
+ if ! isAttribute(self,"aMethods_#{f1}") {
+ AddAttribute(self,"aMethods_#{f1}")
+ aMethods_#{f1} = []
for cMethod in aClassMethods {
if right(cMethod,len("getkeyword_#{f1}")) = "getkeyword_#{f1}" {
- call cMethod()
+ aMethods_#{f1} + cMethod
+ }
}
}
+ for cMethod in aMethods_#{f1} {
+ call cMethod()
+ }
return :NATURAL_NULL
}
'
