summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-03-07 00:03:03 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-03-07 00:03:03 +0100
commitd22004a820b6647393afa04f1a7c781c7fd51f0d (patch)
treee0997cf4f2fbb8282f4d15444deb61e74a8f3c43
parentcce1638cfe47e261cb9b285ba7f7e20dda12340e (diff)
Update documentation.
darcs-hash:cd586d178636f50a46bd5a7c07d4827eda645f3f
-rw-r--r--Lisp/method-definition.lisp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lisp/method-definition.lisp b/Lisp/method-definition.lisp
index 9824c19..38bc702 100644
--- a/Lisp/method-definition.lisp
+++ b/Lisp/method-definition.lisp
@@ -126,7 +126,7 @@ function __super__.
~&~A, respectively.~
~&Have a nice day.\" z a)
(+ y 20))
- => #<OBJECTIVE-C-METHOD OBJECTIVE-C-METHODS::|foo:bar:stuff:do:| (NS:MLK-MY-CLASS T T T NS:NS-NUMBER) {ADA4101}>
+ => #<OBJECTIVE-C-METHOD OBJECTIVE-C-METHODS::|foo:bar:stuff:do:| ((EQL NS:MLK-MY-CLASS) NS:MLK-MY-CLASS T T T NS:NS-NUMBER) {CE8E531}>
(#/foo:bar:stuff:do: (#/new (find-objc-class 'ns::mlk-my-class))
100
@@ -135,7 +135,7 @@ function __super__.
5)
=> Output:
Hello! Z and A are #<NS:NS-INT-NUMBER `30' {82F1DC0}> and
- #<NS:GSC-BUFFER-STRING `FOO!' {82F2190}>, respectively.
+ #<NS:MLK-LISP-STRING `FOO!' {82F2190}>, respectively.
Have a nice day.
=> 120
@@ -151,11 +151,12 @@ happens when Objective-CL first sees an instance of the class.
## Note 2:
-At present, it is important to call
-__define-objective-c-generic-function__ before using
-__define-objective-c-method__, because otherwise the generic function
-automatically created by __define-objective-c-method__ may get the wrong
-class.
+If you do not call __define-objective-c-generic-function__ before using
+__define-objective-c-method__, it will be called implicitly by the
+latter. There is nothing wrong with relying on this; in fact, if you do
+not want to set any options for the generic function, your code will
+probably seem less cramped if you leave the redundant
+__define-objective-c-generic-function__ calls out.
## Note 3:
@@ -282,7 +283,6 @@ __super__, ill-defined, and probably not desirable anyway.
## Examples:
- (define-objective-c-generic-function #/characterAtIndex: (self index))
(define-objective-c-method #/characterAtIndex: :short ((self ns::my-string) (index :unsigned-long))
(if (weird-string-p self)
(super (1+ index))