Hello,
I am trying to build my first Xcode app (just a little helper app for myself).
The following code gives me this error: "[AppDelegate applicationWillFinishLaunching:]: Can’t get name of every file of «class ects» of class "NSObject". (error -1728)"
As far as I can see this is the offending code block from the larger code (as everything else seemed to work), but for completeness I posted the rest of the code below. In ScriptDebugger that code works without any errors.
And everything above the line "--SETUP FOR DATABASE PATH AND DATABASE NAMES" works when I comment out the offending part.
I'd really appreciate any pointers.
Thanks a lot!
I am trying to build my first Xcode app (just a little helper app for myself).
The following code gives me this error: "[AppDelegate applicationWillFinishLaunching:]: Can’t get name of every file of «class ects» of class "NSObject". (error -1728)"
AppleScript:
on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
tell application "Finder"
set file_list to name of every file of entire contents of alias "macOS2:Users:user:DEVONthink:"
end tell
end applicationWillFinishLaunching_
As far as I can see this is the offending code block from the larger code (as everything else seemed to work), but for completeness I posted the rest of the code below. In ScriptDebugger that code works without any errors.
AppleScript:
script AppDelegate
property parent : class "NSObject"
property sizeWindowPrimary : missing value
property sizeWindowInbox : missing value
property sizeDesktop : missing value
property databaseFolderPath : "/Users/user/DEVONthink/"
property databaseNames : missing value
property file_list : missing value
-- IBOutlets
property theWindow : missing value
on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
--SETUP FOR WINDOW SIZES:
set sizeWindowInbox to {0, 23, 640, 0} --replace 23 with 116 once the DEVONthink Helper is active and floats above
set sizeWindowPrimary to {641, 23, 0, 0} --replace 23 with 116 once the DEVONthink Helper is active and floats above
set sizeDesktop to {}
tell application "Finder"
set sizeDesktop to get the bounds of the window of the desktop
end tell
set item 4 of sizeWindowInbox to item 4 of sizeDesktop
set item 3 of sizeWindowPrimary to item 3 of sizeDesktop
set item 4 of sizeWindowPrimary to item 4 of sizeDesktop
--SET UP FOR DATABASE PATH AND DATABASE NAMES
tell application "Finder"
set file_list to name of every file of entire contents of alias "macOS2:Users:user:DEVONthink:"
end tell
end applicationWillFinishLaunching_
And everything above the line "--SETUP FOR DATABASE PATH AND DATABASE NAMES" works when I comment out the offending part.
I'd really appreciate any pointers.
Thanks a lot!