Using Core Data in AppleScripts

I have trouble of finding a way to add Core Data to my AppleScript project which i write in Xcode.

I know that below webpage shows how to create Cocoa project with Core Data (Core Data Document-based Application with Spotlight Importer), but when i choose AppleScript Application from Xcode’s New Project window, i cant even find MyDocument.xcdatamodel, which is referenced in below webpage.

http://developer.apple.com/documentation/Cocoa/Conceptual/NSPersistentDocumentTutorial/02_CreatingProj/creatingProj.html

I didnt find any tutorials which would teach this for newbies.

Thanks

Hi,
you can’t use CoreData directly in AppleScript Studio.
But you can add AppleScript functionality to a CoreData (Cocoa) application
http://www.macgeekery.com/development/adding_basic_applescript_to_core_data_applications

PS: as you can see, your mentioned link points to a part of the Cocoa documentation

Thanks for fast reply

“open the document in Interface Builder. Create a new array controller and call it Notes”

In this tutorial, when i open MyDocument.xib in IB and try to drag array controller to Window, it just “flies” back to Library and nothing happens.

When i get this working, can i just follow this tutorials instructions to create Core Data app then add all the rest of app as AppleScript?

Does anybody know how Snow Leopard changes this? Is it possible with Snow Leopard to write Core Data application without any Cocoa?

Thanks

“Window” is not your document window but the .xib window with the File’s Owner, Application, First Responder etc. icons.

If your use of CoreData is restricted to Cocoa Bindings, you can probably do the rest in AppleScript,
but CoreData is actually a Cocoa (Objective-C) technology. Additional code must be written in ObjC

I strongly doubt it