response constants start with E_ and their codes start with e..
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4491 542714f4-19e9-0310-aa3c-eee0fc999fb1
- Use -dynamiclib instead of -bundle as per Apple's recommendation
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4489 542714f4-19e9-0310-aa3c-eee0fc999fb1
Changed the name to _controlledPanel because otherwise it interfered with
subclass _panel variables. (Actionscript won't let variables be masked).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4483 542714f4-19e9-0310-aa3c-eee0fc999fb1
(Time values are ints and start at 0 when the flash player starts up,
there is a different way to read the epoch millis, returned as a double)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4482 542714f4-19e9-0310-aa3c-eee0fc999fb1
In java, if you override a varargs method you can easily call super, you just
have to do a wee cast:
@Override
public Stuff getStuff (int thing, Object... args)
{
return super.getStuff(thing, (Object[]) args);
}
In abjectscript:
override public function getStuff (thing :int, ... args) :Stuff
{
// This doesn't work, because now 'args' to super is an array
// containing OUR args array as its first element.
return super.getStuff(thing, args);
// We can fix things for super by 'apply'ing the function to
// all the args in one array...
args.unshift(thing);
return super.apply(this, args);
// But it could also be the case that someone is intentionally
// passing an array to this method (many flash library methods take
// varargs but also accept arrays and do this same thing).
if (args.length == 1 && (args[0] is Array)) {
args = (args[0] as Array);
}
return super.getStuff(thing, args); // super must ALSO do the unjimmying
// OR, we could combine the two so that super doesn't have to
// do unjimmying.
}
As a note, there is an 'arguments' object that is secretly placed in every
function call, presumably so that callers can test whether an arg is
the default value because the user didn't pass it in or whether it's
the default because the user happened to pass in the default.
Guess yourself, because that doesn't seem worth adding as a language feature.
Anyway, the 'arguments' is not an array! You can't use it to call super
via 'apply'. It's another associative hash. God bless you actionscript,
you just make so much fucking sense.
So I made a utility method for unfucking vargs.
I bitch a lot, yes, but my bitching takes only a fraction of the time
that was wasted discovering whatever it is I'm bitching about
(this was fun to trace backwards to the source, oh yes), and maybe I
can save others some time as a result.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4477 542714f4-19e9-0310-aa3c-eee0fc999fb1
Java to abjectscript: substitution happens differently and the way I left
it last night was less than ideal.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4476 542714f4-19e9-0310-aa3c-eee0fc999fb1
to prepare messages before handing them off to a MessageFormat.
We don't have those in actionscript, so we don't need to prepare.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4471 542714f4-19e9-0310-aa3c-eee0fc999fb1
If a listener was removed during event dispatch, the size of the list
was shrinking and putting the kibosh on listeners at the end of the list.
(The Java side avoids this due to the different way arrays work.)
- Changed the listener and subscriber lists to simple arrays, and make
a copy prior to dispatch so that we don't miss anybody!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4467 542714f4-19e9-0310-aa3c-eee0fc999fb1
(to which any args will be passed), instead of only dispatching
controller commands.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4465 542714f4-19e9-0310-aa3c-eee0fc999fb1
for when this is used within another widget as a list item renderer.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4460 542714f4-19e9-0310-aa3c-eee0fc999fb1
larger build process get them from dist/lib at the top-level.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4455 542714f4-19e9-0310-aa3c-eee0fc999fb1
(ByteArray is a special class for dealing with bytes. It does not extend
the normal Array).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4452 542714f4-19e9-0310-aa3c-eee0fc999fb1
This doesn't (seem to) work quite right because of the way Flash does
handles component dimensions. It's designed to be overridden.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4450 542714f4-19e9-0310-aa3c-eee0fc999fb1
Do not use getters/setters unless we're overridding one from a superclass.
The getters and setters hide implementation details: you never
know if a getter is doing massive amounts of computation, and it looks like
a simple field access. The nice parenthesis required for normal function
calls are a reminder to the coder that maybe they should stash that value
in a local variable if they're going to use it many times.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4448 542714f4-19e9-0310-aa3c-eee0fc999fb1
included in the mx library is unable to cope with security errors
accessing a child.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4444 542714f4-19e9-0310-aa3c-eee0fc999fb1