03-23-2011 09:34 PM - edited 03-23-2011 10:46 PM
I've written an app that basically creates flowcharts, exports them as JPGs but also saves the project file as XML.
The XML does save, because when I make a new file and try to save a file of the same name the dialogue box says something along the lines of "Pressing save will overwrite the existing file [insert filename here.]" But when I use the browse() function (with no file filter), it says "Pictures" at the top and lists the exported JPGs, but doesn't show any of the XMLs. How do I change this so I can see the XML files, or am I even able to do so?
I was browsing File.documentsDirectory, but I had the same results with File.applicationStorageDirectory.
From the research I've done, it seems to just be a simulator bug of some sort. So, since the app works fine other than that (running the air app on my PC works fine with opening and loading files), should I submit it anyway? I'd greatly prefer to have it submitted by the March 31st deadline for the playbook offer, but I'd also prefer to test it first. But if it is a simulator issue, then I won't be able to test it until I actually get a playbook. Suggestions?
03-23-2011 10:51 PM
I had this same problem -- no XML files show up in the browser, ever. I actually took out the functionality in my app because it was such a pain in the **bleep** -- decided it was better to have less features that all work than more features that are broken because the playbook simulator is old and broken too.
If it's a core part of your app I dunno what to tell you.
03-24-2011 05:39 AM
So do you think I'd just be better off making my own file browser to ensure it works? I've seen something of that sort here: http://www.adobe.com/devnet/air/flex/quickstart/ar
Because this, like you said, an essential feature. ![]()
oh well. I think I can still finish it in time...
03-24-2011 07:40 AM
You may want to do your own simple "browser" since this will probably not get fixed and to us in the next week. You could do an alert with the drop down as a basic "browser" to open a file.
03-24-2011 11:48 AM
Are you specifying a filter? Code from the adobe reference website
var fileToOpen:File = new File();
var txtFilter:FileFilter = new FileFilter("Text", "*.as;*.css;*.html;*.txt;*.xml");
try
{
fileToOpen.browseForOpen("Open", [txtFilter]);
fileToOpen.addEventListener(Event.SELECT, fileSelected);
}
catch (error:Error)
{
trace("Failed:", error.message);
}
The SDK also says if no filter is specified, all files are shown. However, it might show different files if you specifically give a filter for XML.
03-24-2011 02:23 PM
Yeah, sadly, I tried that, once with a filter for just XML, another for anything (the * symbol, right?) with no avail.
Although, I made a workaround by building my own file browser using a dropdown combobox, and that seems to be working fine, so... I guess it's not quite as urgent an issue anymore ![]()