Sort keys in the preferences.txt.

This commit is contained in:
Shigeru KANEMOTO 2012-06-17 02:01:30 +09:00
parent ce1ccb43ba
commit 1750ff0266
1 changed files with 3 additions and 4 deletions

View File

@ -734,11 +734,10 @@ public class Preferences {
// Fix for 0163 to properly use Unicode when writing preferences.txt
PrintWriter writer = PApplet.createWriter(preferencesFile);
Enumeration e = table.keys(); //properties.propertyNames();
while (e.hasMoreElements()) {
String key = (String) e.nextElement();
String[] keys = (String[])table.keySet().toArray(new String[0]);
Arrays.sort(keys);
for (String key: keys)
writer.println(key + "=" + ((String) table.get(key)));
}
writer.flush();
writer.close();