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:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user