Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

different behavior between debug and release builds



I'm working on an app to open user selected keynote presentations from a network location and manipulate them.

It works okay in debug, but when I build it for release Keynote can't open the file path that gets passed.

Here's the snip that works in debug (though I freely admit it seems a bit nonsensical to me):

        tell application "Keynote"
            set filenamePosix to POSIX path of (characters 2 thru (length of fileName) of fileName as string)
            set filenamePosix to (characters 2 thru (length of filenamePosix) of filenamePosix as string) as string
            open filenamePosix
        end tell

fileName comes into this code as a Posix path (slash delimited) starting "\Volumes\XYZ\blah\test.key"

My code (such as it is) ! converts it to a Mac type path (colon delimited), stripping the leading colon so that it's like "Volumes:XYZ:blah:test.key".

In debug, as I say, this works.

When I build and run the release version I get an error to the effect that
Keynote cannot read the file.
You do not have permission to read "olumes:XYZ:blah:test.key"

I've tried various flavors of substringing the filename and have gotten similar messages for "/Volumes...", ":Volumes...", and "Volumes..."

I'm new both to Mac and applescript programming - my native languages these days are VB and C#. So please be gentle.

Any help would be appreciated.

thanks



What are the most popular cars? Find out at Yahoo! Autos
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.