Allow flushing and notifying to be suppressed when a value is set.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5689 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2009-03-24 00:27:46 +00:00
parent 5d0a86c698
commit 195d764347
+6 -3
View File
@@ -79,15 +79,18 @@ public class Config extends EventDispatcher
/**
* Returns the value specified.
*/
public function setValue (name :String, value :Object) :void
public function setValue (
name :String, value :Object, notify :Boolean = true, flush :Boolean = true) :void
{
_data[name] = value;
if (_so != null) {
if (flush && _so != null) {
_so.flush(); // flushing is not strictly necessary
}
// dispatch an event corresponding
dispatchEvent(new ConfigValueSetEvent(name, value));
if (notify) {
dispatchEvent(new ConfigValueSetEvent(name, value));
}
}
/**