开发者

How can I make Air remember the location of last opened file?

All the walkthroughs I've seen specify either desktop, local files as the initial view when calling browseForOpen.

Is there a way to have the air开发者_开发技巧 application remember the last location a file was loaded from and default back there?

If necessary I suppose the path could be written to the local db, but even still, I do not know how to get the filepath of the loaded file.


You can use File.nativePath and File.resolvePath.


A few years later, perhaps, but thought this might help someone in the future.

var file:File = new File();
file.browseForOpen("Open");

This will open the last location.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜