Exposed a method to allow users to batch property set requests into a

dobj transaction. Thanks to mdb for the idea of accepting a function to run
for the batch, rather than exposing startTransaction() and commitTransaction()
directly.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@317 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2007-06-18 19:33:02 +00:00
parent 5116ab7089
commit bdef34eb69
2 changed files with 43 additions and 0 deletions
@@ -218,6 +218,9 @@ public class GameControlBackend
o["getPlayers_v1"] = getPlayers_v1;
o["getPlayerPosition_v1"] = getPlayerPosition_v1;
o["getMyPosition_v1"] = getMyPosition_v1;
o["startTransaction"] = startTransaction_v1;
o["commitTransaction"] = commitTransaction_v1;
}
/**
@@ -590,6 +593,23 @@ public class GameControlBackend
_container.setFocus();
}
/**
* Start a dobj transaction on the game object.
*/
public function startTransaction_v1 () :void
{
validateConnected();
_ezObj.startTransaction();
}
/**
* Commit a dobj transaction on the game object.
*/
public function commitTransaction_v1 () :void
{
_ezObj.commitTransaction();
}
/**
* Convenience function to get our name.
*/