Throw an error if a CF bundle could not be loaded

slava 2006-02-20 03:51:55 +00:00
parent 6d3657ece1
commit 5c637e05f3
2 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,3 @@
- CFBundle error handling
- out of memory from ffi calls
- update amd64 for %unbox-struct and callbacks
- clean up C stack frame assembly code to avoid moving spilled arguments

View File

@ -1,7 +1,8 @@
! Copyright (C) 2006 Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
IN: cocoa
USING: alien arrays hashtables kernel namespaces ;
USING: alien arrays errors hashtables kernel namespaces
sequences ;
TYPEDEF: int CFIndex
@ -47,4 +48,8 @@ FUNCTION: void CFRelease ( void* cf ) ;
t <CFFileSystemURL> f over CFBundleCreate swap CFRelease ;
: load-framework ( name -- )
<CFBundle> CFBundleLoadExecutable drop ;
dup <CFBundle> [
CFBundleLoadExecutable drop
] [
"Cannot load bundled named " swap append throw
] ?if ;