I'm an experienced AIR developer, just dipping my toes into CS extension development. Working in OSX, using the Creative Suite SDK in Flash Builder.
I'm developing an Illustrator extension which needs to open an Illustrator file, and I want to distribute the file with the extension.
Here's what I'm trying:
var app:com.adobe.illustrator.Application = Illustrator.app;
var file:File = File.applicationDirectory.resolvePath("templates/SampleTemplate.ait");
var document:Document = app.open(file);
I think you get that result when the requested file path which does not exist...
"templates" is a direct child of "Applications"?
If you really want to reference a specific path, just specify it.
What I would do would be to just install the file in a predictable place on the hard drive (using a .mxi file to configure the installation location)...
var file:File = new File(CSXSInterface.getInstance().getSystemPath(SystemPath.APPLICATION).data + "/templates/SampleTemplate.ait");