From 9ee26a887b599ab65f00efbccecc0d5b8b213c12 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Wed, 5 Mar 2008 15:06:19 +0100 Subject: Assorted documentation improvements. darcs-hash:9f7b50833bb666d749ad8ab78ab72d7653b64001 --- Lisp/method-invocation.lisp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'Lisp/method-invocation.lisp') diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp index 50c3238..9ed2b68 100644 --- a/Lisp/method-invocation.lisp +++ b/Lisp/method-invocation.lisp @@ -114,13 +114,15 @@ Instead of using __invoke__, which is neither macro-friendly nor very useful for method selection at run-time, you may **funcall** selectors directly. Naturally, __apply__ works as well. -The following calls are all equivalent: - - (invoke-by-name instance \"stringWithCString:encoding:\" \"Mulk.\" 4) - (invoke instance :string-with-c-string \"Mulk.\" :encoding 4) - (funcall (selector \"stringWithCString:encoding:\") instance \"Mulk.\" 4) - (apply (selector \"stringWithCString:encoding:\") (list instance \"Mulk.\" 4)) - +The following calls are all equivalent (though the last one needs the +syntax enhancement provided by __enable-method-syntax__ enabled and the +selector registered by way of __collect-methods__): + + (invoke-by-name class \"stringWithCString:encoding:\" \"Mulk.\" 4) + (invoke class :string-with-c-string \"Mulk.\" :encoding 4) + (funcall (selector \"stringWithCString:encoding:\") class \"Mulk.\" 4) + (apply (selector \"stringWithCString:encoding:\") (list class \"Mulk.\" 4)) + (#/stringWithCString:encoding: class \"Mulk.\" 4) ## See also: -- cgit v1.2.3