Allow a joiner to say "any available seat". Also attempt to report errors in

the TableDirector (in Flash) even though none of that is actually wired up in
MSOY.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@748 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2008-09-24 00:56:51 +00:00
parent 7d160194a3
commit 223ccb86a1
3 changed files with 30 additions and 7 deletions
@@ -73,15 +73,17 @@ public class TableDirector extends BasicDirector
* @param ctx the parlor context in use by the client.
* @param tableField the field name of the distributed set that contains the tables we will be
* managing.
* @param observer the entity that will receive callbacks when things happen to the tables.
* @param bundle the message bundle to use when reporting errors.
*/
public function TableDirector (ctx :ParlorContext, tableField :String)
public function TableDirector (
ctx :ParlorContext, tableField :String, errorBundle :String = null)
{
super(ctx);
// keep track of this stuff
_pctx = ctx;
_tableField = tableField;
_errorBundle = errorBundle;
}
/**
@@ -342,7 +344,7 @@ public class TableDirector extends BasicDirector
// documentation inherited from interface
public function requestFailed (reason :String) :void
{
log.warning("Table action failed [reason=" + reason + "].");
_pctx.getChatDirector().displayFeedback(_errorBundle, reason);
}
/**
@@ -392,6 +394,9 @@ public class TableDirector extends BasicDirector
/** The field name of the distributed set that contains our tables. */
protected var _tableField :String;
/** The message bundle to use when reporting errors. */
protected var _errorBundle :String;
/** The table of which we are a member if any. */
protected var _ourTable :Table;
@@ -44,6 +44,9 @@ import com.threerings.parlor.game.data.GameConfig;
public class Table
implements DSet_Entry, Hashable
{
/** Used to request any position at a table. */
public static const ANY_POSITION :int = -1;
/** The unique identifier for this table. */
public var tableId :int;