From d22004a820b6647393afa04f1a7c781c7fd51f0d Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Fri, 7 Mar 2008 00:03:03 +0100 Subject: Update documentation. darcs-hash:cd586d178636f50a46bd5a7c07d4827eda645f3f --- Lisp/method-definition.lisp | 16 ++++++++-------- 1 file 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)) - => # + => # (#/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 # and - #, respectively. + #, 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)) -- cgit v1.2.3