[Openmcl-devel] PDFKit crashes

Ron Garret ron at awun.net
Wed May 27 18:20:48 PDT 2009


On May 27, 2009, at 4:19 PM, Ron Garret wrote:

> Trying to open and display a PDF file crashes CCL in various ways.
>
> Using this code:
>
> (in-package "CL-USER")
>
> (require :cocoa)
> (objc:load-framework "Quartz" :quartz)
> (defun nsstr (s) (make-instance 'gui::ns-lisp-string :string s))
>
> (defun pdf-from-file (filename)
>  (#/initWithData: (#/alloc ns:pdf-document)
>                   (#/dataWithContentsOfFile: ns:ns-data filename)))
>
> (defun pdf-from-url (url)
>  (#/initWithUrl: (#/alloc ns:pdf-document)
>                  (#/URLWithString: ns:ns-url url)))
>

So it turns out that this problem is due to misspelling initWithURL as  
initWithUrl.  Still, it would be good if the result of this were not a  
hard crash.

Still puzzling over the second problem.

rg




More information about the Openmcl-devel mailing list