Checkpoint. This is not compiling right now due to three annoying problems:
- There seems to be a compiler bug that causes classes to be imported spuriously, or something. Classes that import only one of the Log classes are complaining about visibility of more than one of them. - static constants are not inherited by subclasses, which is super annoying. I will try switching to prototype consts, but there seems to be a problem initializing those, and we don't want to make them vars... - The fact that there are no inner classes combined with no method overloading is making things very inconvenient. I've been experimenting with faking an anonymous class by instantiating a dynamic object and attaching functions to it, but it's not working. I'll continue experimenting, because if we can't do this then someone shoot me. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3957 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -29,6 +29,8 @@ import com.threerings.util.SimpleMap;
|
||||
|
||||
import com.threerings.presents.client.BasicDirector;
|
||||
import com.threerings.presents.client.Client;
|
||||
import com.threerings.presents.client.ClientEvent;
|
||||
import com.threerings.presents.client.InvocationAdapter;
|
||||
import com.threerings.presents.data.ClientObject;
|
||||
import com.threerings.presents.dobj.DObject;
|
||||
import com.threerings.presents.dobj.MessageEvent;
|
||||
@@ -249,7 +251,7 @@ public class ChatDirector extends BasicDirector
|
||||
public function displayFeedback (bundle :String, message :String) :void
|
||||
{
|
||||
displaySystem(
|
||||
bundle, message, SystemMessage.FEEDBACK, PLACE_CHAT_TYPE);
|
||||
bundle, message, SystemMessage.FEEDBACK, ChatCodes.PLACE_CHAT_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -262,7 +264,7 @@ public class ChatDirector extends BasicDirector
|
||||
public function displayAttention (bundle :String, message :String) :void
|
||||
{
|
||||
displaySystem(
|
||||
bundle, message, SystemMessage.ATTENTION, PLACE_CHAT_TYPE);
|
||||
bundle, message, SystemMessage.ATTENTION, ChatCodes.PLACE_CHAT_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -458,15 +460,15 @@ public class ChatDirector extends BasicDirector
|
||||
}
|
||||
|
||||
// if they are idle, report that
|
||||
if (idletime > 0) {
|
||||
// adjust by the time it took them to become idle
|
||||
idletime += _cctx.getConfig().getValue(
|
||||
IDLE_TIME_KEY, DEFAULT_IDLE_TIME);
|
||||
var msg :String = MessageBundle.compose(
|
||||
"m.recipient_idle", MessageBundle.taint(target),
|
||||
TimeUtil.getTimeOrderString(idletime, TimeUtil.MINUTE));
|
||||
displayFeedback(_bundle, msg);
|
||||
}
|
||||
// if (idletime > 0) {
|
||||
// // adjust by the time it took them to become idle
|
||||
// idletime += _cctx.getConfig().getValue(
|
||||
// IDLE_TIME_KEY, DEFAULT_IDLE_TIME);
|
||||
// var msg :String = MessageBundle.compose(
|
||||
// "m.recipient_idle", MessageBundle.taint(target),
|
||||
// TimeUtil.getTimeOrderString(idletime, TimeUtil.MINUTE));
|
||||
// displayFeedback(_bundle, msg);
|
||||
// }
|
||||
};
|
||||
|
||||
_cservice.tell(_cctx.getClient(), target, message,
|
||||
@@ -622,32 +624,32 @@ public class ChatDirector extends BasicDirector
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public override function clientDidLogon (client :Client) :void
|
||||
public override function clientDidLogon (event :ClientEvent) :void
|
||||
{
|
||||
super.clientDidLogon(client);
|
||||
super.clientDidLogon(event);
|
||||
|
||||
// listen on the client object for tells
|
||||
addAuxiliarySource(_clobj = client.getClientObject(),
|
||||
addAuxiliarySource(_clobj = event.getClient().getClientObject(),
|
||||
ChatCodes.USER_CHAT_TYPE);
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public override function clientObjectDidChange (client :Client) :void
|
||||
public override function clientObjectDidChange (event :ClientEvent) :void
|
||||
{
|
||||
super.clientObjectDidChange(client);
|
||||
super.clientObjectDidChange(event);
|
||||
|
||||
// change what we're listening to for tells
|
||||
removeAuxiliarySource(_clobj);
|
||||
addAuxiliarySource(_clobj = client.getClientObject(),
|
||||
addAuxiliarySource(_clobj = event.getClient().getClientObject(),
|
||||
ChatCodes.USER_CHAT_TYPE);
|
||||
|
||||
clearDisplays();
|
||||
}
|
||||
|
||||
// documentation inherited
|
||||
public override function clientDidLogoff (client :Client) :void
|
||||
public override function clientDidLogoff (event :ClientEvent) :void
|
||||
{
|
||||
super.clientDidLogoff(client);
|
||||
super.clientDidLogoff(event);
|
||||
|
||||
// stop listening to it for tells
|
||||
if (_clobj != null) {
|
||||
@@ -702,7 +704,7 @@ public class ChatDirector extends BasicDirector
|
||||
// mogrification may result in something being turned into a slash
|
||||
// command, in which case we have to run everything through again
|
||||
// from the start
|
||||
if (message.startsWith("/")) {
|
||||
if (message.indexOf("/") == 0) {
|
||||
return requestChat(speakSvc, message, false);
|
||||
}
|
||||
|
||||
@@ -818,7 +820,7 @@ public class ChatDirector extends BasicDirector
|
||||
{
|
||||
var bundle :MessageBundle = _msgmgr.getBundle(_bundle);
|
||||
if (!bundle.exists(key)) {
|
||||
return buf;
|
||||
return text;
|
||||
}
|
||||
var repls :Array = bundle.get(key).split("#");
|
||||
// apply the replacements to each mogrification that matches
|
||||
@@ -835,7 +837,7 @@ public class ChatDirector extends BasicDirector
|
||||
* specified command (i.e. the specified command is a prefix of their
|
||||
* registered command string).
|
||||
*/
|
||||
protected function getCommandHandlers (command :String) :SimpleMap
|
||||
internal function getCommandHandlers (command :String) :SimpleMap
|
||||
{
|
||||
var matches :SimpleMap = new SimpleMap();
|
||||
var user :BodyObject =
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.threerings.crowd.chat.client {
|
||||
|
||||
import com.threerings.crowd.chat.data.ChatCodes;
|
||||
|
||||
public class ClearHandler extends CommandHandler
|
||||
{
|
||||
public function ClearHandler (chatdir :ChatDirector)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.threerings.crowd.chat.client {
|
||||
|
||||
import com.threerings.util.MessageBundle;
|
||||
import com.threerings.util.SimpleMap;
|
||||
import com.threerings.util.StringUtil;
|
||||
|
||||
import com.threerings.crowd.chat.data.ChatCodes;
|
||||
@@ -29,7 +30,7 @@ public class HelpHandler extends CommandHandler
|
||||
|
||||
// let the user give commands with or without the /
|
||||
if (hcmd.charAt(0) == "/") {
|
||||
hcmd = hcm.substring(1);
|
||||
hcmd = hcmd.substring(1);
|
||||
}
|
||||
|
||||
// handle "/help help" and "/help boguscmd"
|
||||
|
||||
Reference in New Issue
Block a user