diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-08-05 13:01:54 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-08-05 13:01:54 +0200 |
commit | 9197c82287d253843e8fed25ccfd17a27ed39fa3 (patch) | |
tree | 8a5c70b763f8079dcb0495ab92df0c059aaf4364 /Lisp | |
parent | 7f823a79c0fcaf85a27db96fbe27b361a2d92ec4 (diff) |
Docstring changes to make my newly written documentation generator happy.
darcs-hash:0ad99140dbf02a186037b4d3e040aa6e623571ca
Diffstat (limited to 'Lisp')
-rw-r--r-- | Lisp/libobjcl.lisp | 6 | ||||
-rw-r--r-- | Lisp/method-invocation.lisp | 56 |
2 files changed, 32 insertions, 30 deletions
diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp index 5093d91..296a670 100644 --- a/Lisp/libobjcl.lisp +++ b/Lisp/libobjcl.lisp @@ -90,9 +90,9 @@ string used as if directly given as an argument to FIND-OBJC-CLASS. Examples: - (find-objc-class \"NSObject\") ;=> #<OBJC-CLASS NSObject> - (find-objc-class 'ns-object) ;=> #<OBJC-CLASS NSObject> - (find-objc-class 'nsobject) ;=> NIL + (find-objc-class \"NSObject\") ;=> #<OBJC-CLASS NSObject> + (find-objc-class 'ns-object) ;=> #<OBJC-CLASS NSObject> + (find-objc-class 'nsobject) ;=> NIL Rationale: diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp index 252426f..8de77dd 100644 --- a/Lisp/method-invocation.lisp +++ b/Lisp/method-invocation.lisp @@ -5,59 +5,61 @@ (defun invoke (receiver message-start &rest message-components) "Send a message to an Objective C instance. -RECEIVER: an Objective C wrapper object. +*receiver* --- an Objective C wrapper object. -MESSAGE-START: a symbol. +*message-start* --- a symbol. -MESSAGE-COMPONENTS: an alternating list of arguments and message name -component symbols. +*message-components* --- an alternating list of arguments and message +name component symbols. -Returns: the return value of the method invocation. +Returns: *result* --- the return value of the method invocation. Each message name component is first split into parts seperated by hyphens and each part is converted into a string according to the following rules: - 1. The first part is fully converted to lower case. +1. The first part is fully converted to lower case. - 2. Any additional parts are also fully converted to lower case except - for their first letters, which are left intact. +2. Any additional parts are also fully converted to lower case except + for their first letters, which are left intact. - 3. If the symbol is a keyword symbol, the resulting string is suffixed - by a colon (`:'). +3. If the symbol is a keyword symbol, the resulting string is suffixed + by a colon (`:'). After that, all parts are concatenated in order to form a single message component. The message components are in turn concatenated in order to form the message name which is used as if the second argument to a call -to INVOKE-BY-NAME. +to _invoke-by-name_. The message components that are not message name components are collected in order and the resulting list used as if as additional -arguments to INVOKE-BY-NAME. +arguments to _invoke-by-name_. -Examples: +## Examples: - (invoke (find-objc-class 'ns-string) - :string-with-c-string \"Mulk.\") - ;=> #<GSCBufferString `Mulk.' {5B36087}> + (invoke (find-objc-class 'ns-string) + :string-with-c-string \"Mulk.\") + ;=> #<GSCBufferString `Mulk.' {5B36087}> - (invoke (find-objc-class 'ns-object) - 'self) - ;=> #<NSObject `NSObject' {16ECF598}> + (invoke (find-objc-class 'ns-object) + 'self) + ;=> #<NSObject `NSObject' {16ECF598}> - (invoke (find-objc-class 'ns-object) - 'name) - ;=> \"NSObject\" + (invoke (find-objc-class 'ns-object) + 'name) + ;=> \"NSObject\" + + (invoke (find-objc-class 'ns-string) + :string-with-c-string \"Mulk.\" + :encoding 4) + ;=> #<GSCBufferString `Mulk.' {5B36087}> - (invoke (find-objc-class 'ns-string) - :string-with-c-string \"Mulk.\" - :encoding 4) - ;=> #<GSCBufferString `Mulk.' {5B36087}> +## See also: -See also: INVOKE-BY-NAME" +INVOKE-BY-NAME" (flet ((message-component->string (symbol) (let* ((components (split-sequence #\- (symbol-name symbol) |