From cc2ef1a10e74909d73710efcfe622ac59d236068 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Tue, 14 May 2013 11:07:17 -0400 Subject: [PATCH] todo notes and fix for copy() method in Dict classes --- core/src/processing/data/FloatDict.java | 1 + core/src/processing/data/IntDict.java | 1 + core/src/processing/data/StringDict.java | 1 + core/todo.txt | 36 ++++++++++++------------ todo.txt | 2 ++ 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/core/src/processing/data/FloatDict.java b/core/src/processing/data/FloatDict.java index cb479f49f..7d0f91c7b 100644 --- a/core/src/processing/data/FloatDict.java +++ b/core/src/processing/data/FloatDict.java @@ -519,6 +519,7 @@ public class FloatDict { for (int i = 0; i < count; i++) { outgoing.indices.put(keys[i], i); } + outgoing.count = count; return outgoing; } diff --git a/core/src/processing/data/IntDict.java b/core/src/processing/data/IntDict.java index 44c856ea9..424aaf7ad 100644 --- a/core/src/processing/data/IntDict.java +++ b/core/src/processing/data/IntDict.java @@ -409,6 +409,7 @@ public class IntDict { for (int i = 0; i < count; i++) { outgoing.indices.put(keys[i], i); } + outgoing.count = count; return outgoing; } diff --git a/core/src/processing/data/StringDict.java b/core/src/processing/data/StringDict.java index 9fcf7cd8e..93c3dce54 100644 --- a/core/src/processing/data/StringDict.java +++ b/core/src/processing/data/StringDict.java @@ -346,6 +346,7 @@ public class StringDict { for (int i = 0; i < count; i++) { outgoing.indices.put(keys[i], i); } + outgoing.count = count; return outgoing; } diff --git a/core/todo.txt b/core/todo.txt index 702862be2..5ece09b51 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -153,24 +153,24 @@ o inc(), inc(amount), dec(), dec(amount) X replace (especially for null and NaN) X make note that these work, and are special cases o listAttributes() in XML is like array from keys() etc in our data classes -_ removeIndex() vs removeValue() vs remove() -_ remove() refers to an index (with array) or key (with hash) -_ more consistent with other APIs (Java) -_ replaceValue[s]() the same, though more on the line -_ should we not have remove() and removeIndex() -_ and instead always specify? removeKey(), removeIndex(), removeValue()? -_ would mean that hash would only have removeKey -_ downside: remove() takes whatever get() takes as arg -_ with removeValue(), add removeValues() for all values that match? -_ also support NaN here -_ need to sort out the final version of hash/dict/etc and their names -_ JSONObject.has(key) vs XML.hasAttribute(attr) vs HashMap.containsKey() -_ and how it should be handled with hash/dict -_ right now using hasKey().. in JSONObject -_ contains() as default, then containsValue() as the alternate -_ instead of containsKey() and containsValue() -_ hasAttribute in XML, containsKey in java's Map, hasKey in JSON -_ hasChildren() is another precedent +X removeIndex() vs removeValue() vs remove() +X remove() refers to an index (with array) or key (with hash) +X more consistent with other APIs (Java) +X replaceValue[s]() the same, though more on the line +o should we not have remove() and removeIndex() +o and instead always specify? removeKey(), removeIndex(), removeValue()? +o would mean that hash would only have removeKey +o downside: remove() takes whatever get() takes as arg +X with removeValue(), add removeValues() for all values that match? +X also support NaN here +X need to sort out the final version of hash/dict/etc and their names +X JSONObject.has(key) vs XML.hasAttribute(attr) vs HashMap.containsKey() +X and how it should be handled with hash/dict +X right now using hasKey().. in JSONObject +o contains() as default, then containsValue() as the alternate +o instead of containsKey() and containsValue() +X hasAttribute in XML, containsKey in java's Map, hasKey in JSON +X hasChildren() is another precedent o contains() is nice, but containsKey() is weird, often not 'containing' X hasKey/hasValue is best; fewest changes and most descriptive _ not doing print() methods, since alternatives are more descriptive diff --git a/todo.txt b/todo.txt index a48df56aa..7c85a50d0 100644 --- a/todo.txt +++ b/todo.txt @@ -872,6 +872,8 @@ _ waiting on retina support for JDK 7 _ http://bugs.sun.com/view_bug.do?bug_id=8009754 _ b86 supposed to have some support (not available yet) _ http://jdk8.java.net/download.html +_ "Are you sure you want to quit?" when switching modes on Oracle JVM +_ because it's OS X, but menubar isn't available _ LWJGL forum discussion _ http://lwjgl.org/forum/index.php/topic,4711.225.html _ change cmd line for OS X to use symlink?