Commit Graph

517 Commits

Author SHA1 Message Date
Jamie Doornbos c112a5c982 Regenerated narya services with new GenServiceTask, actionscript and java
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5051 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-08 19:17:34 +00:00
Par Winzell b174219540 We now build a subset of Narya for execution on Tamarin, the server-side AS3 VM.
- We use the ASC compiler, which works quite differently from compc/mxmlc. It doesn't attempt any mapping between class hierarchy and directory structure. You feed it source, that's it. This compiler is under continuous development, and the one shipped in Flex SDK 3 is buggy, so we supply our own in lib/asc.jar for the time being.
 - Since much of Narya relies on classes that don't exist on Tamarin (e.g. DisplayObject), we have to isolate a specific subset of source. Right now that's done ridiculously explicitly as a list of class files, in etc/asc-files.txt. In the long run we will want to resolve this more elegantly, but there are no trivial solutions at hand.
 - We have not implemented the full flash.utils.describeType() for Tamarin, but rather a subset of its functionality: one method to see if one type derives from another, and another method to extract the public variable names in an object. The environment-specific code has been isolated to com.threerings.util.env.Environment, and build.xml simply copies either Environment.as-tm or Environment.as-fp into place depending on what it's targeting.
 - The ASC compilation links against lib/builtin.abc, which supplies information about core classes such as Object, Array, etc, and lib/thane.abc which is our homegrown emulation library containing e.g. flash.net.Socket and other things we need that's not part of the open-source code Adobe donated to Mozilla, but rather still in their proprietary Flash Player code.

I'm committing thane.abc and builtin.abc directly now, but they will shortly be built by the Thane project and published as maven whatnots. We could auto-publish lib/asc.jar too, but I think we may want more explicit control over how we version that.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5045 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-07 15:33:07 +00:00
Par Winzell 4442cb7bc4 Try a different way of assessing the plainness of an object that doesn't rely on describeType(). This could potentially break games and such in somewhat non-obvious ways. I've tested a number of things locally but the next step is www.dev.whirled.com.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5044 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-07 00:34:23 +00:00
Jamie Doornbos 430b23a5bb regenerated services, notice actionscript stuff has the most changes
(I just noticed marshallers are importing themselves but the flash compiler 
doesn't seem to mind, so committing now)



git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5043 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 22:54:58 +00:00
Par Winzell aeafaccd66 I think this depencency on Stage is obsolete now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5040 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 19:45:47 +00:00
Par Winzell 971ec75567 Some manual unused-import removal. I think one or two of these might need further Jamie lovin' but I want to get ABC compilation running.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5039 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 17:12:42 +00:00
Par Winzell 15c16a40b6 Running genreceiver and genservice with Jamie's spiffed-up generators.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5038 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-06 17:03:54 +00:00
Par Winzell 5cae3fb3a3 This is no longer useful to us.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5034 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-05-01 00:00:27 +00:00
Tom Conkling f6e95780f5 created KeyboardCodes. Most of these constants are mysteriously missing from flash.ui.Keyboard, where they're supposed to be.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5028 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-29 00:58:39 +00:00
Ray Greenwell 8b673c08aa Layabout checkin: asdoc cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5023 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-23 21:54:56 +00:00
Ray Greenwell 7cd7cc48cb Swap the order of the generatorFn and callbackFn args.
Made the generatorFn optional, in case the source values are already ready-to-go,
although 99% of the time it's going to be better to use the generator function
to get things ready to go because MultiLoader will take care of figuring out
the sources structure.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5022 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-23 21:47:00 +00:00
Ray Greenwell b65bdd47e1 Use a Timer instead of ENTER_FRAME.
This is a potentially more dangerous change, but nothing
seems awry. Eyes peeled!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5017 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-23 18:17:42 +00:00
Ray Greenwell b367372dc6 Gah, I tried to abort the last commit so I could make this change,
and instead my checkin message got mangled.

*clearing throat*
..So our old way of doing things was pointlessly waiting a frame to handle
network events.
We also ran object subscribe/unsubscribe requests through the same queue,
and now those are processed immediately. Everything seems ok, but let's
keep an eye out.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5016 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-23 18:07:59 +00:00
Ray Greenwell 19831db930 Stop waiting for ENTER_FRAME to process incoming messages.
This was residual from the initial conversion from Java, but I don't think
it's very necessary on the flash side, and Zell is working to decouple
the presents layer from flash-player specific classes and events like
ENTER_FRAME.
So now we just process everything immediately.
I did some tests, it seems that the flash player dispatches ENTER_FRAME,
then it dispatches any network events, then the frame is rendered.
So our old way of doing things was pointlessly 


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5015 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-23 18:04:50 +00:00
Ray Greenwell cd9126b55c - Proper casting.
- Handle the common case first.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5013 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-23 17:32:38 +00:00
Ray Greenwell 5b1b22b955 Removed cruft that long ago was promoted to its own file.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5009 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-22 17:59:52 +00:00
Tom Conkling 8311762471 I blame the beer
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5007 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-19 01:39:55 +00:00
Tom Conkling c6d763127d StringUtil.parseBoolean
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5006 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-19 01:32:21 +00:00
Tom Conkling ab02c0ee30 StringUtil.parseNumber
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5005 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-19 01:06:41 +00:00
Tom Conkling 3b863e30fa Per Ray's suggestion, this returns undefined, rather than null, if the object is not found
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5004 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-17 19:14:42 +00:00
Tom Conkling 855b4f27d4 copy-paste typo fix
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5003 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-17 19:11:12 +00:00
Tom Conkling f0bf02796e ArrayUtil.findIf convenience function
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5002 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-17 19:04:18 +00:00
Ray Greenwell 6736267388 Jamie has discovered that the MultiLoader can sometimes be gc'd before
calling the callback. Loaders are not supposed to do this, but that may
only be when loading over the network and not from a ByteArray.

We know that retaining a reference to the MultiLoader fixes it, but
that increases the burden on the users of this class. Let's try this
instead, I think it will work: just retain references to active MultiLoaders
in the class.

Jamie's going to test this, as well.

(Also: in foreach mode, free references to results after reporting them.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4999 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-15 21:08:25 +00:00
Ray Greenwell 9f51434a57 Bugfix: in foreach mode, we need to report back if a source is already complete.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4998 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-14 03:00:31 +00:00
Nathan Curtis b82dbb416c Modify requestTell() to accept an optional localFeedback parameter, defaulting to
ChatCodes.PLACE_CHAT_TYPE that gets used for any feedback generated from the tell process.  This 
will allow chat systems that display tells in a custom way (tabs) to distinguish tell-related
feedback from other feedback.  


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4996 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-11 17:03:24 +00:00
Nathan Curtis 6b217c0b2b Sorry little buddy, you're not good enough.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4995 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-10 23:31:43 +00:00
Nathan Curtis 74cb0fa9b9 ExpiringSet, from com.threerings.msoy.chat.client.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4994 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-10 22:49:50 +00:00
Tom Conkling 839d722abf whoops - this was performing an unstable sort, backwards
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4992 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-08 20:24:56 +00:00
Ray Greenwell 9ce195b99d Made the Comparator optional.
Match the coding style already present in file (use ii for loop counter..)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4991 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-08 19:37:00 +00:00
Tom Conkling 7fd7a8dc5b Added ArrayUtil.stableSort
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4990 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-08 19:19:24 +00:00
Ray Greenwell 6559b163ed This only need to be unique, not meaningful.
(And yes, code running in a security boundary cannot set aliases, thank god)
Network traffic--.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4987 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-01 02:02:34 +00:00
Ray Greenwell 766643c702 Tested and verified Dictionaries.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4986 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-04-01 01:50:23 +00:00
Michael Bayne 964b68a0fa Beans, frank.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4984 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-28 22:22:34 +00:00
Ray Greenwell 5b29ca6a24 RandomUtil.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4983 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-28 21:02:07 +00:00
Michael Bayne 640eb27564 Make leavePlace() properly NOOP if we're not in a place.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4980 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-27 00:58:32 +00:00
Ray Greenwell 49b893d933 Good news, it appears that flash blocks things in another security domain
from screwing with our registered aliases. This might make points and
rectangles work.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4978 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-22 01:41:15 +00:00
Ray Greenwell 933183a53a Revert.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4976 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-19 07:37:41 +00:00
Ray Greenwell d0a3fa4c8e Occam's razor: presumably getDefinitionByName() returns the same class
for the same name each time it's called. :)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4975 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-19 07:30:33 +00:00
Ray Greenwell bb5c4c224c The 'constructor' property is not to be trusted.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4974 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-19 07:28:05 +00:00
Par Winzell 51bb4d8e92 I am tentatively meddling with Ray's code because pointer comparison on the class fails for objects that are instantiated... elsewhere. Different application domain? Testing on the full class name ought to be safe.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4973 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-03-19 07:25:36 +00:00
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
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
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
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