[Openmcl-devel] Error: Exactly one OBJC:OBJC-CLASS must appear in (#<FORWARD-REFERENCED-CLASS NS-WINDOW>), found 0

Pascal J. Bourguignon pjb at informatimago.com
Sun Dec 27 22:37:19 PST 2015


With Clozure CL.app from the appstore, I observe a behavior distinct
from ccl-1.10 from svn, when loading a system defining a subclass of
NSWindows.  I use quicklisp to compile and load a source file containing
a form which reads as:

    (defclass mclgui-window (ns:ns-window)
      ((window :initform nil :initarg :view :reader nswindow-window))
      (:metaclass ns:+ns-object))

When compiling and loading the file containing this form, I get the
following error, but if I evaluate the source form in the debugger, it
defines the class successfully.  Recompiling and reloading the file
still fails:

[package mclgui]...................
> Error: Exactly one OBJC:OBJC-CLASS must appear in (#<FORWARD-REFERENCED-CLASS NS-WINDOW>), found 0
> While executing: #<COMMON-LISP:STANDARD-METHOD ALLOCATE-INSTANCE (OBJC:OBJC-METACLASS)>, in process Listener(4).
> Type cmd-. to abort, cmd-\ for a list of available restarts.
> Type :? for other options.
1 > (defclass mclgui-window (ns:ns-window)
      ((window :initform nil :initarg :view :reader nswindow-window))
      (:metaclass ns:+ns-object))
#<OBJC:OBJC-CLASS MCLGUI-WINDOW (#x5111B0)>
1 > (:b :count 7)
 (27B180A8) : 0 (FUNCALL (FUNCTION #<#<COMMON-LISP:STANDARD-METHOD ALLOCATE-INSTANCE (OBJC:OBJC-METACLASS)>>) #<OBJC:OBJC-METACLASS NS:+NS-OBJECT (#x7FFF7B640118)> :NAME MCLGUI-WINDOW :DIRECT-SUPERCLASSES (#<FORWARD-REFERENCED-CLASS NS-WINDOW>)) 477
 (27B18108) : 1 (FUNCALL (FUNCTION #<#<COMMON-LISP:STANDARD-METHOD MAKE-INSTANCE (OBJC:OBJC-CLASS-OBJECT)>>) #<OBJC:OBJC-METACLASS NS:+NS-OBJECT (#x7FFF7B640118)> :NAME MCLGUI-WINDOW :DIRECT-SUPERCLASSES (#<FORWARD-REFERENCED-CLASS NS-WINDOW>) :DIRECT-SLOTS ((:NAME WINDOW :INITFORM NIL :INITFUNCTION #<Compiled-function CCL:FALSE #x30000008768F> :INITARGS (:VIEW) :READERS (NSWINDOW-WINDOW)))) 165
 (27B18138) : 2 (FUNCALL (FUNCTION #<#<CCL::STANDARD-KERNEL-METHOD ENSURE-CLASS-USING-CLASS (NULL T)>>) NIL MCLGUI-WINDOW :DIRECT-SUPERCLASSES (NS-WINDOW) :DIRECT-SLOTS ((:NAME WINDOW :INITFORM NIL :INITFUNCTION #<Compiled-function CCL:FALSE #x30000008768F> :INITARGS (:VIEW) :READERS (NSWINDOW-WINDOW))) :METACLASS NS:+NS-OBJECT) 301
 (27B18178) : 3 (ENSURE-CLASS-FOR-DEFCLASS MCLGUI-WINDOW :DIRECT-SUPERCLASSES (NS-WINDOW) :DIRECT-SLOTS ((:NAME WINDOW :INITFORM NIL :INITFUNCTION #<Compiled-function CCL:FALSE #x30000008768F> :INITARGS (:VIEW) :READERS (NSWINDOW-WINDOW))) :METACLASS NS:+NS-OBJECT) 333
 (27B181B0) : 4 (FUNCALL (FUNCTION #<Anonymous Function #x30200361114F>)) 261
 (27B181C8) : 5 (FUNCALL (FUNCTION #<CCL::$FASL-LFUNCALL>) #<CCL::FASLSTATE #x27C3AA2D>) 77
 (27B181E8) : 6 (%FASLOAD "/Users/pjb/.cache/common-lisp/ccl-1.10-f96-macosx-x64/Users/pjb/works/patchwork/src/mclgui/objc-classes.dx64fsl" #(#<Compiled-functi…
1 > (:c 7)
Invoking restart: Recompile objc-classes and try loading it again
........
> Error: The class #<FORWARD-REFERENCED-CLASS NS-WINDOW> was specified as a
>        super-class of the class #<OBJC:OBJC-CLASS MCLGUI-WINDOW (#x5111B0)>;
>        but the meta-classes #<COMMON-LISP:STANDARD-CLASS FORWARD-REFERENCED-CLASS> and
>        #<OBJC:OBJC-METACLASS +MCLGUI-WINDOW (#x525990)> are incompatible.
> While executing: #<CCL::STANDARD-KERNEL-METHOD CCL::ENSURE-CLASS-INITIALIZED (CCL::SLOTS-CLASS)>, in process Listener(4).
> Type cmd-. to abort, cmd-\ for a list of available restarts.
> Type :? for other options.
1 > 


-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk




More information about the Openmcl-devel mailing list