diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-03-06 12:09:25 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-03-06 12:09:25 +0100 |
commit | d4b607fba1a7481f7bef23b38495c591c2ba6e3e (patch) | |
tree | d05013a29c7de2833e62e0d6efbbc16fd926d71d /Lisp | |
parent | 161800b451fbc2cb9ad5952cd3d7ff8d002e800e (diff) |
Implement #/description (NS::MLK-LISP-VALUE).
darcs-hash:40fcce373c4bbecb159aa9e51e52729864fa75d2
Diffstat (limited to 'Lisp')
-rw-r--r-- | Lisp/lisp-value-wrapping.lisp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Lisp/lisp-value-wrapping.lisp b/Lisp/lisp-value-wrapping.lisp index 85cf84a..67c72e6 100644 --- a/Lisp/lisp-value-wrapping.lisp +++ b/Lisp/lisp-value-wrapping.lisp @@ -16,6 +16,7 @@ ;;;; <http://www.gnu.org/licenses/>. (in-package #:mulk.objective-cl) +#.(enable-method-syntax) (eval-when (:compile-toplevel :load-toplevel :execute) @@ -39,6 +40,22 @@ (:metaclass ns::+ns-object)) +(define-objective-c-generic-function #/description (self)) + +(define-objective-c-method #/description :id ((self ns::mlk-lisp-value )) + (#/stringWithUTF8String: (find-objc-class 'ns-string) + (format nil "<MLKLispValue: ~A>" + (write-to-string (lisp-value self) + :readably nil + :escape t + :circle t + :length 50 + :level 5 + :pretty nil + :radix nil + :base 10)))) + + (defcoercion id ((x list)) (intern-lisp-value x)) @@ -113,3 +130,6 @@ (defclass ns::mlk-lisp-list (ns::ns-array lisp-value-wrapper-mixin) () (:metaclass ns::+ns-object)) + + +#.(disable-method-syntax) |