Commit Graph

4914 Commits

Author SHA1 Message Date
Ray Greenwell 76f77b9748 Support Dictionary, too.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4972 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-18 22:13:53 +00:00
Ray Greenwell 783ea0d166 - use isPlainObject()
- support Point and Rectangle.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4971 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-18 22:01:49 +00:00
Ray Greenwell 95e27a7943 Let's print a stack trace when there's an error in the completeCallback,
it could be a ways inside it and we want to help people debug.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4970 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-14 23:08:21 +00:00
Ray Greenwell bb23a5caf1 Two fixes:
- Added a mechanism for testing if something is already loaded after
generation. DataPacks load immediately if passed a ByteArray. Loaders will
always wait a frame, so I was going to change DataPack to follow that
behavior, but it's nice that it just works right after construction.
- If a singleton source was passed in and resulted in an error (or, now,
it can already be loaded as well) then it would incorrectly return
as the result the internal wrapper object for the single result.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4969 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-12 00:31:19 +00:00
Mike Thomas 6e0bd68148 Roll back the interrupt() yet again - 1) it didn't fix the problem we were trying to fix and 2) it was causing problems with logoff.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4968 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-10 17:20:03 +00:00
Mike Thomas 1076052701 Remove the temporary debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4967 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-08 01:34:42 +00:00
Ray Greenwell a5506cdbad Avoid putting an empty String at the end of the array in parseURLs().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4966 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-08 01:20:48 +00:00
Mike Thomas b097e46637 Need a default constructor visible to our descendants.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4965 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-08 00:35:07 +00:00
Mike Thomas 4fabfcf0f3 Resort to adding some temporary logging printouts to BlockingCommunicator to figure out what's keeping the reader thread from being shut down.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4964 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-07 23:53:19 +00:00
Ray Greenwell 7480630c3b Touched up the examples.
Added an example for the advanced case of loading classes at runtime.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4963 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-07 22:21:59 +00:00
Mike Thomas 0af0ce8469 Re-instate the interrupt() but setup some additional exception handling so we don't spew to the logs unnecessarily due to this.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4962 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-07 20:09:13 +00:00
Mike Thomas 69646f624b Roll this back - calling interrupt() in this way caused the other end's writer to get fairly upset.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4961 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-06 21:43:08 +00:00
Michael Bayne d153a06aa2 Reinstate the kick in the pants for the reader thread. Previously we relied on
the LogoffRequest being received by the server which resulted in the server
closing its end of the socket which resulted in the reader being woken up to
hear that its socket was closed and then it exited. We'll just have it exit
immediately. It's possible that messages in transit to the reader that would
have been read prior to full shutdown will now be dropped instead of delivered,
but the client has already requested to logoff, so they can't really care about
additional messages coming from the server.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4960 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-06 19:14:19 +00:00
Michael Bayne 8a745b30e0 Listen for SIGTERM as well and gracefully shutdown in that case.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4959 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-05 23:28:28 +00:00
Mike Thomas e8b5d41fb8 Split out the way we handle the preferred port so we can override that.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4958 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-05 19:09:36 +00:00
Ray Greenwell 8a35738654 Fixed asdoc bug. Boy it's annoying when this happens, asdoc just
gives "Error #1083" without telling you what happened or even which file.

Take note: you can't just invent "@" tags, asdoc freaks out if you use one
it doesn't understand.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4957 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-05 02:32:00 +00:00
Ray Greenwell e1ee1162f9 A bit of commenting touch-up.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4956 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-05 00:52:52 +00:00
Ray Greenwell aae7eb4e58 This isn't actually a valid asdoc tag.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4955 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-05 00:21:23 +00:00
Ray Greenwell a82ead698b Let's deprecate but not remove EmbeddedSwfLoader.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4954 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-05 00:20:05 +00:00
Ray Greenwell e53103cf92 Introducing.. MultiLoader!
This was driven by API simplifcation, but it turns out to be a really cool class.
- Replaces some of the guts of DataPack.
- Replaces DataPackLoader.
- Replaces EmbeddedSwfLoader, although I'm not going to remove that just yet.
- Can be used to coordinate loading of multiple instances of just about anything.

More documentation coming soon.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4953 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-04 23:36:13 +00:00
Ray Greenwell b279ef6eb8 Added Util.isPlainObject().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4952 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-04 23:33:59 +00:00
Ray Greenwell 4f0d94df11 Whoopsie, we want to build against flex, not link it in.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4951 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-04 04:55:15 +00:00
Tom Conkling 8493434099 ArrayUtil.copyOf()
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4950 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-04 03:18:31 +00:00
Dave Hoover 0b068d5189 You know, generifying that correctly is actually a big scary tunnel of dealing with
our generated services & whatnot, so that's a much deeper rabbit hole than I was 
thinking when I just did that one big, so I'm going to leave that well enough alone
for now instead of half-assing it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4949 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-03 22:11:45 +00:00
Dave Hoover 8c5e04aac5 Generify.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4948 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-03 22:06:49 +00:00
Ray Greenwell 938be601e2 Screw it, let's just do the right thing. We'll forget later.
- Use the chaining method to get a resource from ResourceManager.
- Fixed getAll so that it will not overwrite a found property with one
in the parent. Made it also understand locales and do the chaining.

This change'll cause an extra object hash lookup or two for every translation
key, but it's more Right.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4947 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-24 04:13:11 +00:00
Ray Greenwell 8823d592fd Added getAll().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4946 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-24 02:58:26 +00:00
Ray Greenwell da02f02777 Updated to work with the revamped resource handling of flex 3.
We're supposed to use ResourceManager.getString(bundleName, rsrcName)
and that will do cool locale chaining, but then we're looking up
the bundle every time. We may want to revisit this in the future.
(Cool chaining: we can compile the app with the local order as
[ "jp_JP", "en_US" ], and then if we request the "b.buy" key
from the "game" bundle, it will look in japanese for b.buy, but
fall back to english if not found.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4945 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-24 02:48:37 +00:00
Ray Greenwell 32354987f2 Updated for flex 3.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4944 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-22 22:40:51 +00:00
Ray Greenwell f52f686f19 Use the enhanced for-loop.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4943 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-21 02:30:26 +00:00
Ray Greenwell 5cbc654b13 Hm, this wasn't validating the values inside objects. Fixed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4942 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-21 02:28:59 +00:00
Tom Conkling 6dee96bb15 use Function.call(), not Function.apply()
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4941 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-20 00:55:28 +00:00
Tom Conkling 8929c2e89e added RingBuffer.every(), RingBuffer.forEach(), RingBuffer.indexOf()
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4940 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-20 00:40:43 +00:00
Charlie Groves 8a7f4c4121 Clarify that SetListeners get all Entry events, not just the ones for a particular set
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4939 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-19 23:05:30 +00:00
Charlie Groves 7564f88796 Expose the type on Entry* events to SetListener and SetAdapter
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4938 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-19 20:40:09 +00:00
Ray Greenwell 875d4988a3 Added Comparators.COMPARABLE.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4937 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-19 00:40:36 +00:00
Michael Bayne cde838dc45 Call the Flash libraries {library}lib.swc to match the pattern of flexlib.swc
and also to make the Maven artifact not look like a meta-artifact that brings
in all Narya/Nenya/Vilya dependencies.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4936 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-18 19:12:29 +00:00
Michael Bayne 4bb7a2f6a3 Build our Flash libraries like we build our Java libraries.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4935 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-18 18:33:25 +00:00
Ray Greenwell 8ccdf19a42 Fix docs, clarify.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4934 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-05 23:57:57 +00:00
Ray Greenwell 81c4fb64db - Use safeXML utility methods.
- Some doc improvements on StringUtil.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4933 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-05 23:48:07 +00:00
Ray Greenwell 3d2166cd8d Added utility methods for safe XML operations.
So broken! The XML class is not specified in the ECMA-262 standard.
Now I know why they needed the guidelines of ECMAscript: when left
to their own devices they design broken-ass shit.
Adobe needs a cork on their fork.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4932 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-05 23:47:20 +00:00
Ray Greenwell 2ab08d0a6f Removed dependance on mx.utils.StringUtil.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4931 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-04 21:03:01 +00:00
Ray Greenwell 6c70ca11be Commenting improvements.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4930 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-04 21:02:42 +00:00
Ray Greenwell 206fd85f99 Updated StringUtil.toString() to print Objects (associative hashes).
Added some comments about inadequacies.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4929 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-02-01 19:34:54 +00:00
Dave Hoover 4f5d065405 Access this static method in a static way.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4928 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-01-31 21:26:37 +00:00
Ray Greenwell 80cbcdb396 Format our timestamp like the timestamp in our Java logs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4927 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-01-27 22:51:19 +00:00
Ray Greenwell bab168d443 Removed MethodQueue.setStage(), use the same trick we use in
AnimationManager and that I saw in use in Tweener: just
listen for ENTER_FRAME on some random sprite.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4926 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-01-24 21:47:11 +00:00
Ray Greenwell cd421f7fa7 Attempt to quit with an error code when an assertion fails.
This only works in the standalone debug player, if the swf is a trusted
local file.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4925 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-01-24 18:09:49 +00:00
Dave Hoover 24f557c0d7 Speeling
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4924 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-01-22 23:57:54 +00:00
Dave Hoover 2ce35db583 Remove unneeded casts.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4923 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-01-17 01:25:52 +00:00