[Openmcl-devel] REMOVE-ALL-DIRECT-METHODS

Alexander Repenning ralex at cs.colorado.edu
Wed Aug 3 20:25:44 UTC 2011


I need to remove all direct methods of a class. The following code appears to remove all the direct methods yet they can still be invoked. Perhaps there is some caching going on? This is an evil CCL hack. Is this a caching problem? Is there a better, perhaps MOP based approach?


(defun REMOVE-ALL-DIRECT-METHODS (Class)
 (dolist (method (slot-value Class 'ccl::direct-methods))
   (ccl::%remove-direct-methods method)))



;; example
(remove-all-direct-methods (find-class 'player_a_agent))

;; but direct player_a_agent method still executes.


thanks, 
Alex


More information about the Openmcl-devel mailing list