[Cuis-dev] Error performing advised methods

Mariano Montone marianomontone at gmail.com
Fri Jan 13 06:11:12 PST 2023


Hi,

There's an error with AdvisedMethod's implementation I would like to fix.

When installing an AdvisedMethod, an error is signaled if the method 
tries to be performed (calling #perform:), instead of called directly.

I mean: myObject myAdvisedMethod, works. But: myObject perform: 
#myAdvisedMethod, doesn't.

The error says: 'bad number of arguments' when calling the primitive in 
#perform: (primitive nr. 83).

AdvisedMethods are implemented like this:

AdvisedMethod is a subclass of Object that implements #run: aSelector 
with: arguments in: aReceiver .

To advise a method, the CompiledMethod instance at method selector in 
the class method dictionary is replaced by an instance of AdvisedMethod.

Any ideas of what you think the problem is, possible fixes or things I 
could try are welcomed.

Thanks!


         Mariano



More information about the Cuis-dev mailing list