NSString as string error


(NSBundle's mainBundle()'s bundlePath()) as string


Even though logging the pure NSString returns a correct value.

Thanks in advance,


Where did you assign NSBundle variable? The following class works for me.


property NSBundle : class "NSBundle"

script anObject
property parent : class "NSObject"

on doSometing()
set x to NSBundle's mainBundle()'s bundlePath() as text

property NSBundle : class “NSBundle” of current application

I don’t think thats the point because logging the pure NSString seems to work.

Fixed, the error was telling Mail, putting it inside tell me got it working, thanks for replying!

Well good to hear it is working!

Also back to the property. Outside the class the parent is current application like in normal AppleScript; adding current application is overhead/overkill.