Changeset 455
- Timestamp:
- Feb 1, 2004, 11:37:35 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/ccl/examples/bridge.lisp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/examples/bridge.lisp
r452 r455 7 7 ;;;; (1) Convenient Lisp syntax for instantiating ObjC classes 8 8 ;;;; (2) Convenient Lisp syntax for invoking ObjC methods 9 ;;;; (3) Ability to define CLOS subclasses of ObjC class with Lisp slots10 ;;;; and have their instances be usable as ObjC objects (eventually)11 ;;;; (4) Ability to define CLOS methods on ObjC classes and have them be12 ;;;; invoked by ObjC if they match an ObjC method name (eventually)13 9 ;;;; 14 10 ;;;; Copyright (c) 2003 Randall D. Beer … … 133 129 (defun find-objc-class (cname) 134 130 (%objc-class-classptr 135 (if (symbolp cname) 136 ( load-objc-class-descriptor (lisp-to-objc-classname cname))131 (if (symbolp cname) 132 (find-class cname) 137 133 (load-objc-class-descriptor cname)))) 138 134 … … 142 138 143 139 (defun objc-class-of (o) 144 (multiple-value-bind (ignore class) (objc-object-p o) 145 (declare (ignore ignore)) 146 (if (null class) 147 (error "~S is not an ObjC object" o) 148 class))) 140 (if (objc-object-p o) 141 (class-of o) 142 (error "~S is not an ObjC object" o))) 149 143 150 144 … … 153 147 154 148 (defun get-objc-class-from-declaration (otype) 155 (cond ((symbolp otype) 156 (lookup-objc-class (lisp-to-objc-classname otype))) 149 (cond ((symbolp otype) (lookup-objc-class (lisp-to-objc-classname otype))) 157 150 ((and (consp otype) (eq (first otype) '@metaclass)) 158 151 (let* ((name (second otype))
Note:
See TracChangeset
for help on using the changeset viewer.
