Pages

Wednesday, January 30, 2013

Re: Cannot Understand Event Earsffdr Cocoa-Applescript

I've tried the applecation bundle thing, and my code looks like this:

 

 

    on myButtonHandler_(sender)

        set theFolder to POSIX path of (the path to current application's NSBundle's mainBundle()'s bundlePath())

        set theFile to theFolder & "/Contents/Resources/Dir.app"

        display dialog theFile

    end myButtonHandler

 

 

But now the error is:

«class ocid» id «data optr00000000E0B3660401000000» doesn’t understand the «event earsffdr» message. (error -1708)

 


In Applescript Editor, the code makes the error : NSBundle doesn’t understand the mainBundle message.

In addition, 'path to current application' doesen't work either, and it displays the original error.


View the original article here

0 comments:

Post a Comment