Commit Graph

377 Commits

Author SHA1 Message Date
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 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
Ray Greenwell 9f920ae527 Added a note for Future Ray.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5606 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-19 22:13:24 +00:00
Ray Greenwell 7be46ee045 This all seems to work, so let's tidy it up.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5605 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-15 19:39:49 +00:00
Ray Greenwell a3e1c6e09e Fixup.
If there's an error when calling the callback function,
we were assuming it was an argument-related error and trying again.
However, this is sorta bad behavior as we don't want to call
twice into a callback. In the case I was seeing, the first time
in caused an NPE, but popped up a panel, and the second try
was no-opping because the panel was already up (but misconfigured).

So: don't even try a second call, because it looks like
flash will accept args to an argless function.
We'll have to try this out for a while and see if it works.
If so, I can neaten this code. If not, I'll uncomment
some of this and try a more surgical approach (only catch
ArgumentError, only retry if we had 1 boolean arg.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5585 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-09 23:23:15 +00:00
Nathan Curtis 34d2833580 Enums can safely be used as Dictionary keys, and should therefore pass the isSimple() test.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5581 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-06 00:39:05 +00:00
Ray Greenwell e649880f90 Allow a message to be passed to happy testing dumpStack()
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5566 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-20 19:48:47 +00:00
Par Winzell 13c9f01b6e Go go invisible unicode characters.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5562 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-19 17:24:01 +00:00
Par Winzell 5d769cbf5f So, Flash CS4's internal compiler chokes on public class that implements an interface, when it's followed by faux-inner-classes after the main package declaration. This is the only workaround I can think of; pray god Adobe fixes their stuff soon and we can revert this irritating patch.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5561 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-19 15:14:29 +00:00
Tom Conkling 96ae821e58 ArrayUtil.removeFirstIf(), removeLastIf(), removeAllIf() predicate-based removal functions
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5533 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 00:22:26 +00:00
Ray Greenwell a9f7175d2f Removed unused import.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5507 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-05 23:13:08 +00:00
Ray Greenwell ff20abf27d Fixed parameter reading on Windows.
(We are parsing a URL, and even though it represents a file, it's still
a URL, so it uses the standard slash and not the microsoft slash.)
This will make SDK testing work on Windows.
We suck a lot for not fixing this sooner, but
- I didn't have Windows set up for development.
- It was broken for so long, we deprioritized and then sorta forgot about it.
This has been broken for over 5 months, when I last touched this file
to make it work on Macs.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5506 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-05 23:11:49 +00:00
Par Winzell 1a467468ff Don't fill the array with zeroes when we reinitialize the Throttle with the same number of operations as we already had, as that allows a potentially dangerous burst of operations.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5505 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-05 17:17:41 +00:00
Par Winzell bb670e14a8 When we reinitialize the Throttle with a smaller number of allowed operations within a time period, we should preserve the oldest rather than the newest ones, or we'll most likely be in immediate and unfair violation of the limit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5504 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-05 00:21:17 +00:00
Ray Greenwell 2a6940363d Rollback r5502.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5503 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-04 21:42:18 +00:00
Tom Conkling b9245e9be8 In keeping with Adobe's convention, Set and Map's forEach() function takes an optional 'thisObject' param
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5502 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-04 20:21:26 +00:00
Par Winzell 4bc5627d82 Let's have Set implement forEach, like Map does.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5500 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-04 18:21:29 +00:00
Jamie Doornbos ed002196b0 Missed a line from the previous change. Added comment for new ArrayUtil method
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5498 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-04 08:33:05 +00:00
Jamie Doornbos 4633684fb6 Copied code from java implementation of Throttle.reinit(). After testing, I found this method was leaving older values in the middle of younger values
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5497 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-04 06:41:00 +00:00
Jamie Doornbos b9ab203c0c Fixed Throttle bug causing any increase in the number of operations to block all message throughput. Fix prevents copying from negative indices of _ops. This caused a NaN entry which always resulted in an effective age of 0 regardless of getTimer(), causing a permanent state of throttling
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5475 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-28 18:00:55 +00:00
Ray Greenwell f8e4911266 Might as well make our actionscript trim() null tolerant as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5454 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-23 21:00:08 +00:00
Ray Greenwell a0771dce79 - Added a primitive formatNumber()
- Handle commas in parseNumber()


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5449 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-16 20:54:53 +00:00
Nathan Curtis 24b5b905e1 A couple of example usage fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5442 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-14 21:06:28 +00:00
Ray Greenwell 19ac92f624 We've got a utility method for filling an array with an initial value.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5430 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-09 23:20:29 +00:00
Michael Bayne b7214df1c2 We need our array to be filled with zeros, not undefineds.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5429 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-09 22:08:47 +00:00
Michael Bayne 9f2682a5e4 All of the ActionScript side of adjustable outgoing message rate throttling
except the actual throttling part. Need to think about a good way to do this
without blocking the whole client when we hit the throttle.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5428 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-09 20:18:12 +00:00
Ray Greenwell c04adc6a6e Brevify.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5398 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 23:54:58 +00:00
Nathan Curtis d4e02b71d8 This is why MultiLoader didn't work in Air. Explanatory comment below.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5397 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 23:47:11 +00:00
Jamie Doornbos 59534c1ee6 May as well go totally ISO with date stamp, same as log4j %d
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5396 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 21:21:23 +00:00
Ray Greenwell 46e0585e0a - Oh right, change WARNING to WARN (be more like our Java logging)
- Added an ERROR level, along with an error() method.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5395 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 21:11:07 +00:00
Ray Greenwell 7ab2c542da Stop printing square brackets around the log level. Be more like our Java logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5394 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 21:04:52 +00:00
Ray Greenwell 38ab9df44a - Print timestamps like Java (with a "," sep'ing seconds and milliseconds)
- when parsing set log levels, accept "warn" as an alias for "warning".


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5393 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 20:58:46 +00:00
Ray Greenwell d48921acc2 Added deNull().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5392 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 20:55:55 +00:00
Tom Conkling 137a5ac2bf FileUtil.getDotSuffix
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5388 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-23 00:51:34 +00:00
Michael Bayne cfad184d37 Added an email address validity checker.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5387 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-22 18:15:19 +00:00
Ray Greenwell 004954113d Oh, I like that example I used in the checkin, let's use that in the docs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5385 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-19 02:01:17 +00:00
Ray Greenwell a34b08ba34 Do varargs logging just like we do in Java now.
log.info("The message", "key1", value2, "key2", value2, optionalError);


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5384 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-19 01:57:52 +00:00
Ray Greenwell 3be8caecca Comment tweak.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5366 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-11 21:02:55 +00:00
Ray Greenwell 059e7f760d Shock!
Is that 'private' you see there? Omigod. It is.
Normally we eschew private because we feel like people should be
able to use our classes how they see fit.
However, you *really* shouldn't be futzing with these fields,
and them being protected would allow someone to write an Enum subclass
and fuck-up other unrelated Enum subclasses, so I'm making an exception here.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5365 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-11 21:01:10 +00:00
Ray Greenwell c0a8e204da Jamie points out that asdoc sucks the wet farts from dead pigeons,
and so @param tags just match up to parameters based on order.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5364 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-10 20:35:00 +00:00
Ray Greenwell 0809963ee9 formatting and commenting.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5363 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-09 23:58:12 +00:00
Jamie Doornbos b4af7a0250 Allow explicit enumeration of fields for fieldsToString and simpletoString, doing automatic enumeration by default
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5362 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-09 23:36:05 +00:00
Ray Greenwell d5546a37fb Fixed suffix determination for message pluralization.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5359 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-04 23:19:56 +00:00
Ray Greenwell 6179c74b29 Utilize Util.equals() to compare ByteArrays.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5357 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-04 22:20:20 +00:00
Ray Greenwell e730991df9 - Make a copy of the values array to return to callers, so they can't
hose our internal data structures.
- some additional comments


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5355 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-04 19:31:36 +00:00
Ray Greenwell b0973478fd Extra comments.
Extra booch-checking.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5354 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-04 01:51:20 +00:00
Ray Greenwell 9d3ff0b44d If the server streams an array of enums, it will surely think they're final.
So we'd better do the same here.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5353 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-04 01:29:43 +00:00
Ray Greenwell 85a5cc1de1 Enum base class that does most of the right things.
(The beginning.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5351 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-04 01:22:14 +00:00
Jamie Doornbos cacd096f3b Reveal the contents of Dictionary objects in toString
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5345 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-08-27 00:42:03 +00:00