Trouble Loading my Own bundle

199 views
Skip to first unread message

Matt

unread,
Jan 24, 2010, 9:12:24 PM1/24/10
to F-Script
Hi.

I'm a f-script newbie. Would love to use it to play with ideas for
apps. I'm trying to load a bundle that has a datamodel I built. Each
time i try to load my bundle in FScript with the command (NSBundle
bundleWithPath:myBundleString) load it tells me NO. If I type
NSBundle allBundles next to my bundle is says (not yet loaded). What
are the requirements to load in my own bundle into f-script?

-Matt

Philippe Mougin

unread,
Jan 24, 2010, 11:01:17 PM1/24/10
to F-Script
Hi,

This problem might be caused by an architecture mismatch between your
bundle and F-Script. Bundles requiring 64 bits execution must be
loaded in F-Script running in 64 bit (the default). For 32 bit
bundles, you must launch F-Script in 32 bit mode (you can do that in
the same way you do with other applications: open the Finder inspector
on F-Script.app and check "open in 32 bit mode").
If your bundle requires running with automatic garbage collection only
or in reference counting mode only, you must make sure F-Script is the
same mode. You can configure F-Script to execute in the right memory
management mode using its preference panel.

Philippe

Ken Ferry

unread,
Jan 25, 2010, 1:01:37 AM1/25/10
to f-sc...@googlegroups.com
You can also get a little more information using -[NSBundle loadAndReturnError:].

> ep := FSObjectPointer objectPointer


> (NSBundle bundleWithPath:'/Applications/TextEdit.app') loadAndReturnError:ep

false


> ep at:0

Error Domain=NSCocoaErrorDomain Code=3584 "The bundle “TextEdit” couldn’t be loaded because its executable isn’t loadable." UserInfo=0x200f81f20 {NSLocalizedFailureReason=The bundle’s executable isn’t loadable., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Applications/TextEdit.app/Contents/MacOS/TextEdit, NSBundlePath=/Applications/TextEdit.app, NSLocalizedDescription=The bundle “TextEdit” couldn’t be loaded because its executable isn’t loadable.}


-Ken

--
You received this message because you are subscribed to the Google Groups "F-Script" group.
To post to this group, send email to f-sc...@googlegroups.com.
To unsubscribe from this group, send email to f-script+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/f-script?hl=en.


Matt

unread,
Jan 25, 2010, 11:29:21 AM1/25/10
to F-Script
Thanks Ken! You advice help alot. I was aware of the method
loadAndReturnError: but I had no idea how to pass in a pointer to
it.

-Matt

On Jan 24, 11:01 pm, Ken Ferry <kenfe...@gmail.com> wrote:
> You can also get a little more information using -[NSBundle
> loadAndReturnError:].
>
> > ep := FSObjectPointer objectPointer
> > (NSBundle bundleWithPath:'/Applications/TextEdit.app')
>
> loadAndReturnError:ep
>
> false
>
> > ep at:0
>
> Error Domain=NSCocoaErrorDomain Code=3584 "The bundle “TextEdit” couldn’t be
> loaded because its executable isn’t loadable." UserInfo=0x200f81f20
> {NSLocalizedFailureReason=The bundle’s executable isn’t loadable.,
> NSLocalizedRecoverySuggestion=Try reinstalling the bundle.,
> NSFilePath=/Applications/TextEdit.app/Contents/MacOS/TextEdit,
> NSBundlePath=/Applications/TextEdit.app, NSLocalizedDescription=The bundle
> “TextEdit” couldn’t be loaded because its executable isn’t loadable.}
>
> -Ken
>

> > f-script+u...@googlegroups.com<f-script%2Bunsu...@googlegroups.com>

Matt

unread,
Jan 25, 2010, 11:36:36 AM1/25/10
to F-Script
Thanks Philippe. It turns out that it was a Garbage collection
incompatibility.

A big thanks for your effort to create this great tool. I'm just
learning Cocoa and have been yearning for an interactive tool to
explore the different frameworks available and how to use them. F-
Script is exactly the tool I was looking for.

-Matt

Philippe Mougin

unread,
Jan 25, 2010, 6:38:42 PM1/25/10
to F-Script
Matt, glad you like it. And welcome to F-Script and Cocoa!
Reply all
Reply to author
Forward
0 new messages