If the class is not found it tries to compile a method in UndefinedObject, which if not logged in as SystemUser leads
to a confusing security error . If logged in as SystemUser, it seems like the wrong default to take ...
method: RwTopazTonelReader
newMethodDefinitionForClassNamed: className classIsMeta: meta selector: selector category: category source: source
"for topaz TFILE and TMETHOD commands, compile the method instead of creating a method definition"
| behavior symbolList |
symbolList := GsCurrentSession currentSession symbolList.
behavior := symbolList objectNamed: className asSymbol.
behavior ifNil:[ Error signal: 'class ', className , ' not found]. <<<<<<< Recommend adding this line
meta
ifTrue: [ behavior := behavior class ].
behavior
compileMethod: source
dictionaries: symbolList
category: category
environmentId: self environmentId
To reproduce , login as DataCurator, and use topaz TFILE to load methods for a class which is not yet defined .
If the class is not found it tries to compile a method in UndefinedObject, which if not logged in as SystemUser leads to a confusing security error . If logged in as SystemUser, it seems like the wrong default to take ...
method: RwTopazTonelReader newMethodDefinitionForClassNamed: className classIsMeta: meta selector: selector category: category source: source "for topaz TFILE and TMETHOD commands, compile the method instead of creating a method definition"
To reproduce , login as DataCurator, and use topaz TFILE to load methods for a class which is not yet defined .