[Openmcl-devel] Determining OSX version at runtime

Raffael Cavallaro raffaelcavallaro at mac.com
Fri Aug 27 07:54:39 PDT 2010


On Aug 27, 2010, at 10:22 AM, Raffael Cavallaro wrote:

> probably want to do that in an autorelease pool so we don't leak an NSArray and a bunch of NSStrings:
> 
> (defun framework-loaded-p (framework-namestring) ;; case sensitive
>  (ccl::with-autorelease-pool
>      (let* ((frameworks (#/allFrameworks ns:ns-bundle)))
>        (loop for i below (#/count frameworks)
>          for current-framework = (ccl::lisp-string-from-nsstring
>                                   (#/bundleIdentifier (#/objectAtIndex: frameworks i)))
>          when (search framework-namestring current-framework)
>          return current-framework))))


Sorry for the noise - this won't work with ccl - even though the cocoa runtime thinks the framework is loaded, you can't see it from ccl until you use the relevant interface directory.

warmest regards,

Ralph




Raffael Cavallaro
raffaelcavallaro at me.com








More information about the Openmcl-devel mailing list