Commit Graph

777 Commits

Author SHA1 Message Date
Ray Greenwell 62fb546f27 Check this out. This little buddy rocks.
I sorta want to make a new FunctionUtil so that I can use it
with impunity everwhere without having to include the other crap in here.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5730 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 21:23:23 +00:00
Ray Greenwell bb87184632 Should resolve infinite recursion with SortedHashMap.
Tip from the pros: when you change a class, you might want to check
the subclasses for possible problems with that change.
:P


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5729 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 20:01:01 +00:00
Ray Greenwell 96bdaf9f1f Allow XML to be encoded.
Let's try it and see if it works. Let us know Nathan.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5728 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 01:06:00 +00:00
Ray Greenwell d354d951b8 Small tweaks. Apply directly to the nipples.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5727 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 23:00:36 +00:00
Ray Greenwell cbbd1f281d WeakValueHashMap. Apply directly to the ...
I hate your checkin comments, but I love your product!

The real reason I cleaned up HashMap: I override
forEach(), and now I don't need to do anything to make values() and keys()
work properly for weak values. Less code is better code.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5726 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 22:55:40 +00:00
Ray Greenwell dbf20bdc28 WeakReference. Apply directly to the forehead.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5725 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 22:53:35 +00:00
Ray Greenwell 3300421741 - Use [] instead of "new Array()"
- Implement keys() and values() using forEach().
  - Less code is better code.
  - But, it's less efficient:
    - values() now looks up simple-key values by hashing
    - values() now unwraps non-simple keys, even though unneeded
    - keys() looks up simple-key values, even though unneeded

Say it with me like a 14-year-old girl: whatEVER!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5724 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 22:51:12 +00:00
Ray Greenwell 0f73afc492 This class is remarkably pointless.
We could trash it and change our toStringBuf() methods
to just return a String. I guess. Then the caller would
have to assign the string somewhere. I guess this has some value.

So anyway: Occam's razor, and fixes a small bug: appending undefined
would print as "null" since it was being forced to an Object first.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5722 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 20:25:26 +00:00
Ray Greenwell 305c53f53a These are breaking asdoc.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5721 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 18:52:15 +00:00
Michael Bayne 61f752a105 Check the right things in our Preconditions.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5720 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 00:28:07 +00:00
Michael Bayne b160aa944f Let's just have SafeSubscriber take two callbacks instead of forcing everyone
to screw around with SubscriberAdapter.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5719 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 00:22:24 +00:00
Michael Bayne 202f6bba81 Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5718 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 00:13:29 +00:00
Ray Greenwell 021b5dab22 I swear I had made one of these way back when. Here it is again.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5716 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-14 01:40:14 +00:00
Michael Bayne 7f97d41fd5 Fail earlier here if we have no _clobj. I have been seeing this in testing,
though annoyingly now I can't reproduce it. Call Heisenberg!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5712 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-08 20:32:47 +00:00
Michael Bayne e90fb7465d Avoid calling bytesAvailable if the socket is not connected. It causes needless
exception throwage.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5711 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-07 20:51:10 +00:00
Ray Greenwell fd321d6f2d Let directors dispatch events.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5708 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-06 21:10:32 +00:00
Ray Greenwell c192056f3a Listen for security errors on our socket.
Have the FrameReader stop listening on the socket when we're done with it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5707 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-03 17:40:54 +00:00
Michael Bayne 752642db17 Nixed more asdoc-killing unused imports. Why these didn't kill my local asdoc
but do on the build server, I know not.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5705 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-31 01:20:08 +00:00
Michael Bayne 916950e873 Nixed unused imports that were breaking asdoc.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5703 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-30 22:55:13 +00:00
Ray Greenwell ab8406806e The quick fix: It was never intended that there'd be two goddamn
ChatDirectors in a client.

The slow fix: Maybe I can fix _that_.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5702 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-27 22:46:11 +00:00
Ray Greenwell 423aee81af Move broadcast filtering into the command handler.
Break out the actual doing of the broadcast so that just that can be overridden.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5699 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-26 22:01:49 +00:00
Ray Greenwell 3c8e293071 Added a way to suppress the feedback generated when a mute is changed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5694 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-25 21:38:14 +00:00
Ray Greenwell 52cedb5bdb Comment.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5692 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-24 21:00:38 +00:00
Ray Greenwell d46acc6bc4 Added createReverse(), and make comparators compatible with a flex Sort
object.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5691 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-24 20:56:34 +00:00
Ray Greenwell 904be81707 Actually, let's only allow suppressing flushing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5690 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-24 00:30:27 +00:00
Ray Greenwell 195d764347 Allow flushing and notifying to be suppressed when a value is set.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5689 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-24 00:27:46 +00:00
Michael Bayne 5d0a86c698 If we never dispatched a DID_LOGON, then don't dispatch a DID_LOGOFF. Dispatch
a FAILED_TO_LOGON instead.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5688 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-19 23:40:03 +00:00
Ray Greenwell af14e64c04 Moved these here functions to Util.
Immediately after writing them I considered that they didn't
really belong in ArrayUtil, since they don't operate on Arrays.
Util is better, since it's less specific.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5686 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-18 01:13:38 +00:00
Michael Bayne d67bcc5e01 Track more accurately whether or not we're switching servers and publish that
in the ClientEvent that is sent out with all will/didLogon and will/didLogoff
notifications.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5681 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-05 23:56:02 +00:00
Ray Greenwell aa0bb22527 Added keys() and values() to Array-ificate Object/Dictionary properties.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5679 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-05 01:03:06 +00:00
Ray Greenwell 1566d00c75 These should all be immutable.
Hopefully nothing was setting the values.
If so, maybe we'll see compile-time errors/warnings.
Maybe.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5677 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-03 22:30:15 +00:00
Ray Greenwell 07a42c7364 Added a note. It's not a complete adobe fuck-up, as it works in
test cases I've made, it just doesn't work in *other instances*,
which I haven't yet been able to control for.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5676 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-03 22:26:18 +00:00
Michael Bayne d4f1e7763c Send our auth request directly instead of running it through the queue. Also
log our boot groups to make it easier to distinguish which "server" we're
logging onto.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5675 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-27 03:13:08 +00:00
Ray Greenwell 1b585febf9 Tighten this up a bit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5674 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-26 00:42:26 +00:00
Ray Greenwell 64b6df7dfa It's another "Jesus, really Adobe?" commit message!
Apparently they enhanced AMF3 encoding in flash 10. Dictionaries
seem to be encoded differently. I'm sure they thought that they
could sneak this in because it's backwards-compatible, but they
thought wrong. If a Flash 10 client encodes a Dictionary, it
can't be read by a flash 9 client because it's not forwards-compatible.

If you change the spec, you gotta change the version number, because
this shit might be persistent.

So: work around it. Might be sketchy. Let's keep an eye on it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5673 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-26 00:24:23 +00:00
Ray Greenwell ad09bec805 Allow whether we're persisting to be queried.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5672 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-25 04:39:56 +00:00
Ray Greenwell 63181c6fc1 Allow to be constructed in, and flipped between, storing
preferences or just providing a runtime place for them to live.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5671 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-25 04:33:55 +00:00
Michael Bayne ba7a7af8d3 Sanity++. In theory this is functionally equivalent.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5661 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-19 21:08:07 +00:00
Ray Greenwell 302665c65a Added loadClasses(), for convenience of the common pattern of loading
stuff into an ApplicationDomain.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5658 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-18 19:38:55 +00:00
Jamie Doornbos c5b7379dea Modernized logging of safe object manager
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5652 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-11 21:51:52 +00:00
Tom Conkling bb9f068782 commentfix
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5650 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-06 21:24:41 +00:00
Ray Greenwell 02d97ddec1 Allow a preconfigured URLRequest to be passed in.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5646 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-01-30 00:12:22 +00:00
Ray Greenwell 8058dd35e8 Added the ChatSnooper interface, to hear about chat from the server
prior to it being filtered.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5622 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-01-07 02:22:12 +00:00
Michael Bayne 053d411d41 Have the LocationDirector configure the ChatDirector with the current place
rather than having the ChatDirector listen for location changes from the
location director. This allows us to have multiple location directors work with
the same chat director as long as we're only in one place in one of the
location directors at a time.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5621 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-01-06 22:24:28 +00:00
Ray Greenwell 0c4665e587 We actually want to refuse to stream either int or Number
plainly. Actionscript prevents us from reliably using them.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5619 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-01-06 02:11:55 +00:00
Jamie Doornbos 5cfb56f003 Fix recently introduced error where int values could not be written out as objects, particularly problematic for generic containers like StreamableHashMap. This was causing the creation of tables to fail for any game with a "range" custom parameter. There is likely a better fix for this, but this will do until we think of it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5617 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-01-04 22:27:37 +00:00
Ray Greenwell 7728ed9bd3 Further cleanup: always look up streamers by their java name.
- Sliiiiightly less efficient in a few cases.
- But: looking typed arrays up by class didn't work anyway,
  there was some duplicated code in jname and class lookup,
  and the jname thing handles Lists from the server. So
  overall I think this is a win.
Less code is better code.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5610 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-31 00:41:20 +00:00
Ray Greenwell e9152193b7 - Just use dictionaries, which are inside the HashMaps anyway.
- Register Long.

(I could probably sweep through narya and re-jigger a bunch of
the actionscript code that was written while I was learning the
language.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5609 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-30 23:59:40 +00:00
Ray Greenwell e6ea84e5da Refactor to avoid linear lookup of streamers.
This was a bit of a rabbit hole and took longer than expected,
and I had a stupid bug that took a while to find,
but in the end there are way more lines of code removed than
added, so I'll call it a win. Streamer lookup is now via a Dictionary.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5608 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-30 23:25:50 +00:00
Ray Greenwell c7612ecb7d Apply Jamie's fix for negative numbers here on the actionscript side, too.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5607 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-30 20:25:51 +00:00