Re: Re[1]: Newbie: how to enumerate methods in a class
Syver Enstad <[email protected]> 10 Dec 2002 15:57:54 +0100
| Newsgroups | gmane.emacs.eieio |
|---|---|
| Message-ID | <[email protected]> |
Syver Enstad <[email protected]> writes: > "Eric M. Ludlam" <[email protected]> writes: > > > That might look like this: > > > > (let ((methods (eieio-all-generic-functions 'yourclasshere))) > > (while methods > > (if (string-match "^test-" (symbol-string (car methods))) > > (funcall (car methods) yourobject other-param)) > > (setq methods (cdr methods)))) > > > > Good Luck. I'll have to try our your new program. Here it is. You should be able to see what it does by the tests. Btw, I found out how to "clean" up the methods. (defun clean () "Now it works" (mapcar (lambda (each) (put each 'eieio-method-obarray nil)) (eieio-all-generic-functions 'test-case-test)) ) -- Vennlig hilsen Syver Enstad
(unnamed)
(application/octet-stream, 8.3 KB) - not displayed