Making callEZCode() 'internal' booched it for WorldGameControl.
Made it protected, added a second function for 'friend' access. We could use a custom namespace for this, too. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@206 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -37,7 +37,7 @@ public class CollectionsControl extends SubControl
|
|||||||
*/
|
*/
|
||||||
public function merge (srcColl :String, intoColl :String) :void
|
public function merge (srcColl :String, intoColl :String) :void
|
||||||
{
|
{
|
||||||
_ctrl.callEZCode("mergeCollection_v1", srcColl, intoColl);
|
_ctrl.callEZCodeFriend("mergeCollection_v1", srcColl, intoColl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -93,7 +93,7 @@ public class CollectionsControl extends SubControl
|
|||||||
protected function populate (
|
protected function populate (
|
||||||
collName :String, values :Array, clearExisting :Boolean) :void
|
collName :String, values :Array, clearExisting :Boolean) :void
|
||||||
{
|
{
|
||||||
_ctrl.callEZCode("populateCollection_v1", collName, values, clearExisting);
|
_ctrl.callEZCodeFriend("populateCollection_v1", collName, values, clearExisting);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -103,7 +103,7 @@ public class CollectionsControl extends SubControl
|
|||||||
collName :String, count :int, msgOrPropName :String, playerId :int,
|
collName :String, count :int, msgOrPropName :String, playerId :int,
|
||||||
consume :Boolean, callback :Function) :void
|
consume :Boolean, callback :Function) :void
|
||||||
{
|
{
|
||||||
_ctrl.callEZCode("getFromCollection_v2", collName, count, msgOrPropName,
|
_ctrl.callEZCodeFriend("getFromCollection_v2", collName, count, msgOrPropName,
|
||||||
playerId, consume, callback);
|
playerId, consume, callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -557,7 +557,7 @@ public class EZGameControl extends BaseControl
|
|||||||
/**
|
/**
|
||||||
* Call a method across the security boundary.
|
* Call a method across the security boundary.
|
||||||
*/
|
*/
|
||||||
internal function callEZCode (name :String, ... args) :*
|
protected function callEZCode (name :String, ... args) :*
|
||||||
{
|
{
|
||||||
if (_funcs != null) {
|
if (_funcs != null) {
|
||||||
try {
|
try {
|
||||||
@@ -571,6 +571,16 @@ public class EZGameControl extends BaseControl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A "friend" version of callEZCode for subControls.
|
||||||
|
*/
|
||||||
|
internal function callEZCodeFriend (name :String, ... args) :*
|
||||||
|
{
|
||||||
|
// var args
|
||||||
|
args.unshift(name);
|
||||||
|
callEZCode.apply(this, args);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal method that is called whenever the mouse clicks our root.
|
* Internal method that is called whenever the mouse clicks our root.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class SeatingControl extends SubControl
|
|||||||
*/
|
*/
|
||||||
public function getPlayerPosition (playerId :int) :int
|
public function getPlayerPosition (playerId :int) :int
|
||||||
{
|
{
|
||||||
return int(_ctrl.callEZCode("getPlayerPosition_v1", playerId));
|
return int(_ctrl.callEZCodeFriend("getPlayerPosition_v1", playerId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -21,7 +21,7 @@ public class SeatingControl extends SubControl
|
|||||||
*/
|
*/
|
||||||
public function getPlayerIds () :Array /* of playerId (int) */
|
public function getPlayerIds () :Array /* of playerId (int) */
|
||||||
{
|
{
|
||||||
return (_ctrl.callEZCode("getPlayers_v1") as Array);
|
return (_ctrl.callEZCodeFriend("getPlayers_v1") as Array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: methods for allowing a player to pick a seat
|
// TODO: methods for allowing a player to pick a seat
|
||||||
|
|||||||
Reference in New Issue
Block a user