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 +++++++++------- Lisp/reader-syntax.lisp | 5 +++-- 2 files changed, 12 insertions(+), 9 deletions(-) (limited to '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: diff --git a/Lisp/reader-syntax.lisp b/Lisp/reader-syntax.lisp index 7416a30..a8a4978 100644 --- a/Lisp/reader-syntax.lisp +++ b/Lisp/reader-syntax.lisp @@ -73,8 +73,9 @@ _objective-c-selectors__ as the **symbol package**. ## Note: -Absent manual changes by the user, the __fdefinition__ of any **fbound** -**symbol** read by this **reader macro** will be a __selector__. +Absent manual interventions by the user, the __fdefinition__ of any +**fbound** **symbol** read by this **reader macro** will be a +__selector__. Method __selector__s have to be interned prior to use. As this reader macro is not capable of interning new __selector__s, you have to ensure -- cgit v1.2.3