Commit Graph

4348 Commits

Author SHA1 Message Date
Michael Bayne 7379cf09db Communicate the client's timezone to the server during the authentication
process and keep that information around in case the server ever wants to know.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4356 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-07 01:56:41 +00:00
Ray Greenwell 70854349af This was missing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4355 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-01 01:32:52 +00:00
Ray Greenwell 1461dc1ccc Created a ResultAdapter... but called it ResultWrapper.
There is already a ResultAdapter in util/ that adapts an
invocation service ResultListener into a com.samskivert.util.ResultListener.

Flash can't cope with two classes of the same name in the same library
module, so I named my adapter *Wrapper. For consistency it would be nice
if these were the same in ActionScript and Java, so maybe we'll end up
just renaming the one in util/.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4354 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-01 01:10:24 +00:00
Ray Greenwell 8f958e2505 Added truncate().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4353 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-09-01 01:05:23 +00:00
Ray Greenwell 9e1f81ceff Made more compatible with the base class, use object properties to
specify the command name and arg.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4352 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-31 00:12:48 +00:00
Ray Greenwell 0149aa3b1d Rollback last commit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4351 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-30 00:34:07 +00:00
Ray Greenwell a0626f8a3a Pass the authdata returned by the Authenticator into the ClientResolver.
This is actually kind of sketchy, because the resolver can't depend on it
because there are methods to resolve a client object without having an
authenticated connection.
For now, I'll leave this in.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4350 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-30 00:05:22 +00:00
Ray Greenwell 124835193e If the button is a toggle button and no arg has been specified,
pass the value of 'selected' (true or false) as the argument.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4349 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-29 20:55:16 +00:00
Ray Greenwell de5f5c4aec Follow new style, look for a function named COMMAND first.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4348 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-29 20:54:23 +00:00
Ray Greenwell 8386957cbc Allow the handleCOMMAND functions to have no arg if the command's arg is null.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4347 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-29 01:06:06 +00:00
Andrzej Kapolka 83b9ce29d2 I believe this should be null, rather than Object.class; the system was
looking for something assignable from Object (rather than the other 
way around) when the argument was null.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4346 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-25 19:13:04 +00:00
Michael Bayne 6a47c766cc Switched to a better name.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4345 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-24 18:42:22 +00:00
Michael Bayne b4d66588c1 Added some magic on the road toward more elegant support for dynamic languages
like Groovy and JRuby. Created a DynamicEventDispatcher that automatically maps
attribute, element and set events to methods. Say you have a field:

  public DSet occupantInfo;

you can create a method in any class:

  public void occupantInfoAdded (BodyObject source, OccupantInfo entry);

and then bind that class as a listener using the dynamic event dispatcher:

  _myobj.addListener(new DynamicEventDispatcher(object));

I also created a nicer replacement for the MessageHandler system which is
clunky but still way simpler than using a full InvocationService. Basically we
dispatch MessageEvent as if it were a method call. 

For example, in AtlantiManager I define:

    public void placeTile (BodyObject placer, AtlantiTile tile)

which receives a request by a player to place a tile on their turn. Then in
AtlantiController, I simply call:

   _atlobj.manager.invoke("placeTile", tile);

Of course, in JRuby and Groovy, that's going to look like:

   _atlobj.manager.placeTile(tile);

which is all part of the fun.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4344 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-24 17:35:32 +00:00
Ray Greenwell 0291990de9 Match some changes on the java side (No effect).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4343 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-24 00:41:24 +00:00
Michael Bayne bc9f53396c Revamped distributed object creation. There was no particular reason to create
distributed objects by reflection since we don't allow clients to create
objects, furthermore we needn't do it asynchronously. The object creation
methods were moved into the server-side only interface and made "immediate", so
the caller creates a derived instance of DObject and registers it with the
system instead of creating it with a Subscriber callback.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4342 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-23 23:46:48 +00:00
Ray Greenwell 1f204669c4 Fixed shortClassName() to not display a leading '.'.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4341 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-23 21:27:14 +00:00
Ray Greenwell 1d37bcaa06 A very boring and generic chatbox (moved from msoy).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4340 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-23 21:15:16 +00:00
Ray Greenwell 62d613bf64 This was moved to ezgame/util and renamed the EZObjectMarshaller.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4339 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-23 21:14:23 +00:00
Ray Greenwell 104c50febd Refactored some stuff out of MsoySprite into a generic container that
can load and display images, swfs, video, etc...


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4338 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-23 18:45:22 +00:00
Ray Greenwell 98a2c3f4ba Removed TestClient, checked in a few inconsequential changes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4337 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-22 20:47:43 +00:00
Ray Greenwell 8996d8da20 Marshall and unmarshall arrays in a standard way.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4336 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-21 23:31:13 +00:00
Ray Greenwell d57d213904 Use jdk1.5 notation to do away with the array type prototypes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4335 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-21 21:50:24 +00:00
Ray Greenwell e597ecb14f Oops: there is no such thing as integer math, so we'd better make sure
that we don't try to access array element .125 at runtime.
The designers of flash need to be suspended over a tank of sharks while
people try to write a program in actionscript to reel them in. I bet half
the time it compiles into something that just lets those ropes go.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4334 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-21 21:42:04 +00:00
Ray Greenwell 67a4eecc15 Abjectscript is just such a great language. I fixed two bugs in here that the
compiler never wanted to tell me about.
- I was trying to store read values into the streamer itself, referecing
  it as "this[ii]". This turns out to be legal, even though the class is
  sealed, because you can access public fields using the [] operator with
  a string argument. At runtime, ii == 0, it got Stringdafied to "0" and
  then a field called "0" was looked up on the class and oh no, it didn't
  exist.
- Worse, I had a line that referenced "length" instead of "arr.length".
  There is no length defined in the class, nor is there one in the superclass.
  It turns out the base class Object has an undocumented constant called
  length that seems to always be 0. Isn't that special?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4333 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-21 21:39:14 +00:00
Ray Greenwell ff274735a9 Allow creation of an array of arrays of bytes...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4332 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-19 01:05:53 +00:00
Ray Greenwell 39376d9d20 Extend ListenerAdapter, changed the failed function to be the first arg.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4331 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-19 01:05:17 +00:00
Andrzej Kapolka 9607d33093 Suppress warnings in generated code.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4330 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-17 23:39:21 +00:00
Ray Greenwell 79efc4dd0d Some comments laying about.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4329 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-17 22:16:04 +00:00
Ray Greenwell 1ae508f3aa Removed the pointless InvocationCodes.SUCCESS, moved it to ChatCodes,
which was the only child class that used it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4328 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-16 18:38:39 +00:00
Ray Greenwell 1518c12cdf Implement PlaceControllerDelegates.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4327 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-16 00:25:19 +00:00
Ray Greenwell be83e13003 Occam's razor, comment fix.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4326 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-16 00:09:53 +00:00
Ray Greenwell ac242c0eca Encode nulls as a null byte array.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4325 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-15 21:32:50 +00:00
Michael Bayne f40325fa67 Revamped the way network stats are tracked so that they are all monotonically
increasing integers. Added tracking for connect and disconnect events.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4324 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-15 00:12:42 +00:00
Ray Greenwell cc4ed0b9d9 Commit comment containing information determined through experimentation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4323 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-14 21:45:51 +00:00
Ray Greenwell 53aacc4bbc Added ClassUtil.isSameClass(), reimplemented another function using
the constructor property.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4322 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-12 01:19:30 +00:00
Ray Greenwell c85996ae5d Check that the other name is the same subclass of Name, not just a Name.
(And found a faster way to compare the classes of two objects.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4321 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-11 23:54:41 +00:00
Ray Greenwell 51a40c5f4f Use mx.utils.DisplayUtil.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4320 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-11 17:40:28 +00:00
Ray Greenwell 54f3fdb3e6 Implement Boolean array streaming.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4319 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-11 02:43:30 +00:00
Ray Greenwell 999acc1829 The event needs to be cancellable now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4318 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-11 02:03:47 +00:00
Ray Greenwell ce5caaedfe Ah, I figured out how to fix up my one issue with controllers:
The default behavior of an event is determined by the entity that calls
into the event dispatcher, so the solution was to unify the dispatch of
these events. Created a utility method in CommandEvent to do that, and
did some singlton-like hackery on the constructor to prevent folks from
thinking they can just dispatch these themselves and have it work correctly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4317 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-11 01:22:50 +00:00
Michael Bayne 1d2c8ae7ac Allow a name to be provided to a persisting unit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4316 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-10 22:03:06 +00:00
Ray Greenwell ec3f1c1ddd Added a utility class for marshalling flash Objects.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4315 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-10 18:02:48 +00:00
Ray Greenwell 2ccf76d30a This is exactly the kind of thing I hate about abjectscript: if you forget
to cast something, it's all OK. Luckily I spelled everything correctly,
but lets change it so that the compiler can help us check things.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4314 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-10 18:02:00 +00:00
Mike Thomas e8cd7631fd Allow a message to specify the name to display for a user separate from the canonical username passed in the message as the speaker variable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4313 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-09 22:26:38 +00:00
Ray Greenwell be62ca7301 Right, "Z" means boolean in Java array classnames.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4312 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-09 20:03:14 +00:00
Michael Bayne e1b68c4cd9 Display the entry first then the set.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4311 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-09 02:47:50 +00:00
Ray Greenwell 4fde46f362 Handle boolean arrays from the server.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4310 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-09 00:58:43 +00:00
Ray Greenwell 9a8214d39d This method should be protected.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4309 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-09 00:55:25 +00:00
Ray Greenwell 85d97f5e25 I forgot to pass in the "this" required by Function.apply() (or rather, I
was passing in the args as the 'this').
I made the last checkin after compiling to make sure everything was right,
but I forget that compiling doesn't check much in actionscript.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4308 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-08 23:25:16 +00:00
Ray Greenwell a56e12089c One has to be careful when overriding, or otherwise transferring
args from one varargs method to another, so that the varargs array from
the outer method is not packaged up as one arg to the inner method.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4307 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-08-08 23:22:26 +00:00