Avoid calling the type constant TYPE.

Make a reasonable name for each.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@542 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2008-01-08 01:36:18 +00:00
parent 6e5142f938
commit d198c25780
7 changed files with 12 additions and 12 deletions
@@ -80,7 +80,7 @@ package com.threerings.ezgame {
/** /**
* Dispatched when a user chats. * Dispatched when a user chats.
* *
* @eventType com.threerings.ezgame.UserChatEvent.TYPE * @eventType com.threerings.ezgame.UserChatEvent.USER_CHAT
*/ */
[Event(name="UserChat", type="com.threerings.ezgame.UserChatEvent")] [Event(name="UserChat", type="com.threerings.ezgame.UserChatEvent")]
@@ -42,7 +42,7 @@ import flash.geom.Point;
/** /**
* Dispatched when the size of the game area changes. * Dispatched when the size of the game area changes.
* *
* @eventType com.threerings.ezgame.SizeChangedEvent.TYPE * @eventType com.threerings.ezgame.SizeChangedEvent.SIZE_CHANGED
*/ */
[Event(name="SizeChanged", type="com.threerings.ezgame.SizeChangedEvent")] [Event(name="SizeChanged", type="com.threerings.ezgame.SizeChangedEvent")]
@@ -24,14 +24,14 @@ package com.threerings.ezgame {
/** /**
* Dispatched when a property has changed in the shared game state. * Dispatched when a property has changed in the shared game state.
* *
* @eventType com.threerings.ezgame.PropertyChangedEvent.TYPE * @eventType com.threerings.ezgame.PropertyChangedEvent.PROPERTY_CHANGED
*/ */
[Event(name="PropChanged", type="com.threerings.ezgame.PropertyChangedEvent")] [Event(name="PropChanged", type="com.threerings.ezgame.PropertyChangedEvent")]
/** /**
* Dispatched when a message arrives with information that is not part of the shared game state. * Dispatched when a message arrives with information that is not part of the shared game state.
* *
* @eventType com.threerings.ezgame.MessageReceivedEvent.TYPE * @eventType com.threerings.ezgame.MessageReceivedEvent.MESSAGE_RECEIVED
*/ */
[Event(name="msgReceived", type="com.threerings.ezgame.MessageReceivedEvent")] [Event(name="msgReceived", type="com.threerings.ezgame.MessageReceivedEvent")]
@@ -29,7 +29,7 @@ import flash.events.Event;
public class MessageReceivedEvent extends EZEvent public class MessageReceivedEvent extends EZEvent
{ {
/** The type of all MessageReceivedEvents. */ /** The type of all MessageReceivedEvents. */
public static const TYPE :String = "msgReceived"; public static const MESSAGE_RECEIVED :String = "msgReceived";
/** /**
* Access the message name. * Access the message name.
@@ -50,7 +50,7 @@ public class MessageReceivedEvent extends EZEvent
public function MessageReceivedEvent ( public function MessageReceivedEvent (
gameCtrl :Object, messageName :String, value :Object) gameCtrl :Object, messageName :String, value :Object)
{ {
super(TYPE, gameCtrl); super(MESSAGE_RECEIVED, gameCtrl);
_name = messageName; _name = messageName;
_value = value; _value = value;
} }
@@ -30,7 +30,7 @@ import flash.events.Event;
public class PropertyChangedEvent extends EZEvent public class PropertyChangedEvent extends EZEvent
{ {
/** The type of a property change event. */ /** The type of a property change event. */
public static const TYPE :String = "PropChanged"; public static const PROPERTY_CHANGED :String = "PropChanged";
/** /**
* Get the name of the property that changed. * Get the name of the property that changed.
@@ -71,7 +71,7 @@ public class PropertyChangedEvent extends EZEvent
gameCtrl :Object, propName :String, newValue :Object, gameCtrl :Object, propName :String, newValue :Object,
oldValue :Object, index :int = -1) oldValue :Object, index :int = -1)
{ {
super(TYPE, gameCtrl); super(PROPERTY_CHANGED, gameCtrl);
_name = propName; _name = propName;
_newValue = newValue; _newValue = newValue;
_oldValue = oldValue; _oldValue = oldValue;
@@ -32,7 +32,7 @@ import flash.geom.Point;
public class SizeChangedEvent extends EZEvent public class SizeChangedEvent extends EZEvent
{ {
/** The type of this event. */ /** The type of this event. */
public static const TYPE :String = "SizeChanged"; public static const SIZE_CHANGED :String = "SizeChanged";
/** /**
* Get the size of the game area, expressed as a Point * Get the size of the game area, expressed as a Point
@@ -48,7 +48,7 @@ public class SizeChangedEvent extends EZEvent
*/ */
public function SizeChangedEvent (gameCtrl :Object, size :Point) public function SizeChangedEvent (gameCtrl :Object, size :Point)
{ {
super(TYPE, gameCtrl); super(SIZE_CHANGED, gameCtrl);
_size = size; _size = size;
} }
@@ -29,7 +29,7 @@ import flash.events.Event;
public class UserChatEvent extends EZEvent public class UserChatEvent extends EZEvent
{ {
/** The type of a property change event. */ /** The type of a property change event. */
public static const TYPE :String = "UserChat"; public static const USER_CHAT :String = "UserChat";
/** /**
* Get the name of the user who spoke. * Get the name of the user who spoke.
@@ -52,7 +52,7 @@ public class UserChatEvent extends EZEvent
*/ */
public function UserChatEvent (gameCtrl :Object, speaker :int, message :String) public function UserChatEvent (gameCtrl :Object, speaker :int, message :String)
{ {
super(TYPE, gameCtrl); super(USER_CHAT, gameCtrl);
_speaker = speaker; _speaker = speaker;
_message = message; _message = message;
} }