Commit Graph

  • afad7dd444 Added support for streaming List and ArrayList natively. A List will be unmarshalled into an ArrayList on the receiver. Along the way, I improved support for generic types as arguments to invocation services (which required one unfortunate "sweeping" warning suppression, but since this is in generated code, I think we can be sure it won't be doing anything untoward). Michael Bayne 2006-09-19 00:31:50 +00:00
  • 036271438a Some bits: made the actionscript Observer list cope and furthermore keep all observers in the list if the 'apply' function you specify returns void. Ray Greenwell 2006-09-14 01:48:09 +00:00
  • 54d3bb6496 Missed a spot where getStreamer() was called which motivated further changing around of the interface (I wanted to automatically call getStreamerClass() for the caller but that turns out not to be possible when unstreaming so fuck it). Michael Bayne 2006-09-12 01:09:01 +00:00
  • 13bcdf769d Retidied. Michael Bayne 2006-09-12 00:49:49 +00:00
  • 65b14cfdb5 Was using the wrong getDeclaringClass() to get an enum's proper class. Things are now correct, but unfortunately a little more complicated. Michael Bayne 2006-09-12 00:47:27 +00:00
  • eb3c6ae9cf A particular enum value may actually be a derived class of the declared enum type, but we don't really want to pollute our class <-> id mapping with a bunch of extra fiddly enum classes, so we stream all enums as instances of their declared type and let Enum.valueOf() map back to the custom derived type when it creates an instance during deserialization. Michael Bayne 2006-09-12 00:32:06 +00:00
  • ac5951eaa1 Finally incorporated Par's Enum streaming support, modified to use the string value to avoid future compatibility problems if someone saves an object to a database and then later adds a new enum anywhere but at the end of the list, thereby changing the ordinals. Michael Bayne 2006-09-12 00:04:14 +00:00
  • 5a8b9e14db Lovely varargs, like MessageUtil in samskivert. Ray Greenwell 2006-09-11 22:16:01 +00:00
  • f4e7fd73f6 Commented out upstream methods for classes that will never use them. Ray Greenwell 2006-09-11 20:19:11 +00:00
  • bb40bd533a Reverted a recent change: I was shutting down when we were detached from our parent, but we don't want to do that for most sprites which are shutdown anyway in a more managed way, and specifically our avatar sprite is re-used as we move from room to room. Ray Greenwell 2006-09-08 18:34:12 +00:00
  • b596aa724e We don't need to hash, just use an ArrayList. ObjectInputStream works in conjunction with a ObjectOutputStream on the other end. The ObjectOutputStream will always assign class codes starting at 1 and increasing sequentially from there, so we can look up a class by index rather than hashing. Uses less memory and is faster. Ray Greenwell 2006-09-08 18:02:08 +00:00
  • e973c00b50 Made equals() compare arrays by value. Ray Greenwell 2006-09-08 17:42:58 +00:00
  • 2c84eb9251 Added hexlate() and unhexlate() to StringUtil. Ray Greenwell 2006-09-08 02:30:12 +00:00
  • ddd796431d Pulled mask configuration into its own method. Ray Greenwell 2006-09-07 23:23:58 +00:00
  • 412a2f21d2 Some bits to make this behave better. Ray Greenwell 2006-09-07 21:44:20 +00:00
  • bd306351ee Removed some code that only needs to be on the server-side. Ray Greenwell 2006-09-07 21:31:34 +00:00
  • 0ed50738a9 Added append() and prepend(). Ray Greenwell 2006-09-07 21:30:11 +00:00
  • e88abe3751 Whoops, removed stray line. Ray Greenwell 2006-09-07 03:14:03 +00:00
  • 796c6d2587 Match change to java class. Ray Greenwell 2006-09-07 03:10:47 +00:00
  • 7379cf09db Communicate the client's timezone to the server during the authentication process and keep that information around in case the server ever wants to know. Michael Bayne 2006-09-07 01:56:41 +00:00
  • 70854349af This was missing. Ray Greenwell 2006-09-01 01:32:52 +00:00
  • 1461dc1ccc Created a ResultAdapter... but called it ResultWrapper. There is already a ResultAdapter in util/ that adapts an invocation service ResultListener into a com.samskivert.util.ResultListener. Ray Greenwell 2006-09-01 01:10:24 +00:00
  • 8f958e2505 Added truncate(). Ray Greenwell 2006-09-01 01:05:23 +00:00
  • 9e1f81ceff Made more compatible with the base class, use object properties to specify the command name and arg. Ray Greenwell 2006-08-31 00:12:48 +00:00
  • 0149aa3b1d Rollback last commit. Ray Greenwell 2006-08-30 00:34:07 +00:00
  • a0626f8a3a Pass the authdata returned by the Authenticator into the ClientResolver. This is actually kind of sketchy, because the resolver can't depend on it because there are methods to resolve a client object without having an authenticated connection. For now, I'll leave this in. Ray Greenwell 2006-08-30 00:05:22 +00:00
  • 124835193e If the button is a toggle button and no arg has been specified, pass the value of 'selected' (true or false) as the argument. Ray Greenwell 2006-08-29 20:55:16 +00:00
  • de5f5c4aec Follow new style, look for a function named COMMAND first. Ray Greenwell 2006-08-29 20:54:23 +00:00
  • 8386957cbc Allow the handleCOMMAND functions to have no arg if the command's arg is null. Ray Greenwell 2006-08-29 01:06:06 +00:00
  • 83b9ce29d2 I believe this should be null, rather than Object.class; the system was looking for something assignable from Object (rather than the other way around) when the argument was null. Andrzej Kapolka 2006-08-25 19:13:04 +00:00
  • 6a47c766cc Switched to a better name. Michael Bayne 2006-08-24 18:42:22 +00:00
  • b4d66588c1 Added some magic on the road toward more elegant support for dynamic languages like Groovy and JRuby. Created a DynamicEventDispatcher that automatically maps attribute, element and set events to methods. Say you have a field: Michael Bayne 2006-08-24 17:35:32 +00:00
  • 0291990de9 Match some changes on the java side (No effect). Ray Greenwell 2006-08-24 00:41:24 +00:00
  • bc9f53396c Revamped distributed object creation. There was no particular reason to create distributed objects by reflection since we don't allow clients to create objects, furthermore we needn't do it asynchronously. The object creation methods were moved into the server-side only interface and made "immediate", so the caller creates a derived instance of DObject and registers it with the system instead of creating it with a Subscriber callback. Michael Bayne 2006-08-23 23:46:48 +00:00
  • 1f204669c4 Fixed shortClassName() to not display a leading '.'. Ray Greenwell 2006-08-23 21:27:14 +00:00
  • 1d37bcaa06 A very boring and generic chatbox (moved from msoy). Ray Greenwell 2006-08-23 21:15:16 +00:00
  • 62d613bf64 This was moved to ezgame/util and renamed the EZObjectMarshaller. Ray Greenwell 2006-08-23 21:14:23 +00:00
  • 104c50febd Refactored some stuff out of MsoySprite into a generic container that can load and display images, swfs, video, etc... Ray Greenwell 2006-08-23 18:45:22 +00:00
  • 98a2c3f4ba Removed TestClient, checked in a few inconsequential changes. Ray Greenwell 2006-08-22 20:47:43 +00:00
  • 8996d8da20 Marshall and unmarshall arrays in a standard way. Ray Greenwell 2006-08-21 23:31:13 +00:00
  • d57d213904 Use jdk1.5 notation to do away with the array type prototypes. Ray Greenwell 2006-08-21 21:50:24 +00:00
  • e597ecb14f Oops: there is no such thing as integer math, so we'd better make sure that we don't try to access array element .125 at runtime. The designers of flash need to be suspended over a tank of sharks while people try to write a program in actionscript to reel them in. I bet half the time it compiles into something that just lets those ropes go. Ray Greenwell 2006-08-21 21:42:04 +00:00
  • 67a4eecc15 Abjectscript is just such a great language. I fixed two bugs in here that the compiler never wanted to tell me about. - I was trying to store read values into the streamer itself, referecing it as "this[ii]". This turns out to be legal, even though the class is sealed, because you can access public fields using the [] operator with a string argument. At runtime, ii == 0, it got Stringdafied to "0" and then a field called "0" was looked up on the class and oh no, it didn't exist. - Worse, I had a line that referenced "length" instead of "arr.length". There is no length defined in the class, nor is there one in the superclass. It turns out the base class Object has an undocumented constant called length that seems to always be 0. Isn't that special? Ray Greenwell 2006-08-21 21:39:14 +00:00
  • ff274735a9 Allow creation of an array of arrays of bytes... Ray Greenwell 2006-08-19 01:05:53 +00:00
  • 39376d9d20 Extend ListenerAdapter, changed the failed function to be the first arg. Ray Greenwell 2006-08-19 01:05:17 +00:00
  • 9607d33093 Suppress warnings in generated code. Andrzej Kapolka 2006-08-17 23:39:21 +00:00
  • 79efc4dd0d Some comments laying about. Ray Greenwell 2006-08-17 22:16:04 +00:00
  • 1ae508f3aa Removed the pointless InvocationCodes.SUCCESS, moved it to ChatCodes, which was the only child class that used it. Ray Greenwell 2006-08-16 18:38:39 +00:00
  • 1518c12cdf Implement PlaceControllerDelegates. Ray Greenwell 2006-08-16 00:25:19 +00:00
  • be83e13003 Occam's razor, comment fix. Ray Greenwell 2006-08-16 00:09:53 +00:00
  • ac242c0eca Encode nulls as a null byte array. Ray Greenwell 2006-08-15 21:32:50 +00:00
  • f40325fa67 Revamped the way network stats are tracked so that they are all monotonically increasing integers. Added tracking for connect and disconnect events. Michael Bayne 2006-08-15 00:12:42 +00:00
  • cc4ed0b9d9 Commit comment containing information determined through experimentation. Ray Greenwell 2006-08-14 21:45:51 +00:00
  • 53aacc4bbc Added ClassUtil.isSameClass(), reimplemented another function using the constructor property. Ray Greenwell 2006-08-12 01:19:30 +00:00
  • c85996ae5d Check that the other name is the same subclass of Name, not just a Name. (And found a faster way to compare the classes of two objects.) Ray Greenwell 2006-08-11 23:54:41 +00:00
  • 51a40c5f4f Use mx.utils.DisplayUtil. Ray Greenwell 2006-08-11 17:40:28 +00:00
  • 54f3fdb3e6 Implement Boolean array streaming. Ray Greenwell 2006-08-11 02:43:30 +00:00
  • 999acc1829 The event needs to be cancellable now. Ray Greenwell 2006-08-11 02:03:47 +00:00
  • ce5caaedfe Ah, I figured out how to fix up my one issue with controllers: The default behavior of an event is determined by the entity that calls into the event dispatcher, so the solution was to unify the dispatch of these events. Created a utility method in CommandEvent to do that, and did some singlton-like hackery on the constructor to prevent folks from thinking they can just dispatch these themselves and have it work correctly. Ray Greenwell 2006-08-11 01:22:50 +00:00
  • 1d2c8ae7ac Allow a name to be provided to a persisting unit. Michael Bayne 2006-08-10 22:03:06 +00:00
  • ec3f1c1ddd Added a utility class for marshalling flash Objects. Ray Greenwell 2006-08-10 18:02:48 +00:00
  • 2ccf76d30a This is exactly the kind of thing I hate about abjectscript: if you forget to cast something, it's all OK. Luckily I spelled everything correctly, but lets change it so that the compiler can help us check things. Ray Greenwell 2006-08-10 18:02:00 +00:00
  • e8cd7631fd Allow a message to specify the name to display for a user separate from the canonical username passed in the message as the speaker variable. Mike Thomas 2006-08-09 22:26:38 +00:00
  • be62ca7301 Right, "Z" means boolean in Java array classnames. Ray Greenwell 2006-08-09 20:03:14 +00:00
  • e1b68c4cd9 Display the entry first then the set. Michael Bayne 2006-08-09 02:47:50 +00:00
  • 4fde46f362 Handle boolean arrays from the server. Ray Greenwell 2006-08-09 00:58:43 +00:00
  • 9a8214d39d This method should be protected. Ray Greenwell 2006-08-09 00:55:25 +00:00
  • 85d97f5e25 I forgot to pass in the "this" required by Function.apply() (or rather, I was passing in the args as the 'this'). I made the last checkin after compiling to make sure everything was right, but I forget that compiling doesn't check much in actionscript. Ray Greenwell 2006-08-08 23:25:16 +00:00
  • a56e12089c One has to be careful when overriding, or otherwise transferring args from one varargs method to another, so that the varargs array from the outer method is not packaged up as one arg to the inner method. Ray Greenwell 2006-08-08 23:22:26 +00:00
  • 902d12e1ac Added a convenient way to quickly add debugging output to a program without importing anything: Log.testing("bla bla bla"); trace() is global too, but that goes directly to the debugger, not to the Log system, so we can't see trace() statements in the firebug console, for example. Ray Greenwell 2006-08-08 22:43:39 +00:00
  • f9a0392841 Bugfix. Ray Greenwell 2006-08-08 22:41:48 +00:00
  • c9d262bf64 Just print the exception. If it has a message, that will be printed, otherwise we'll just get the name. I'm killing StringUtil.getMessage(). Ray Greenwell 2006-08-08 20:06:53 +00:00
  • 35c7144d26 Log stack traces for errors thrown in controller handle* methods. Ray Greenwell 2006-08-07 23:22:42 +00:00
  • fe78d7d9cd Added commented-out method that was added to our Java counterpart. Ray Greenwell 2006-08-07 19:47:09 +00:00
  • 309000f827 Added startsWith(). Ray Greenwell 2006-08-07 19:46:47 +00:00
  • e4d7da7d19 Added getAll(). Michael Bayne 2006-08-07 19:04:48 +00:00
  • e2a292e0fb Use localeCompare. Ray Greenwell 2006-08-07 17:27:01 +00:00
  • f665a5b2ea Added toString(), moved static methods to top. Michael Bayne 2006-08-07 17:25:13 +00:00
  • 52bd679f6c If the normalized version of a name is the same as the raw version, it may already be the case that the normalize() method returned the same String, but if not, ensure that we're only holding on to one of those Strings. Ray Greenwell 2006-08-04 23:04:29 +00:00
  • 47a8a27a4e Cleanup. Ray Greenwell 2006-07-29 01:10:15 +00:00
  • 3d7c12a5d1 Allow a little more info in deciding whether to declare the place empty. Mike Thomas 2006-07-28 21:16:37 +00:00
  • 7c17069a16 Some fixups and enhancements. Ray Greenwell 2006-07-28 02:48:52 +00:00
  • ad74efc332 An adapter for a ClientObserver. Ray Greenwell 2006-07-26 00:37:02 +00:00
  • 151a0d9d1e There's no 'throws' in ActionScript, so essentially all exceptions are runtime. The only way to learn what might be thrown is to read all the documentation for a method. (Complaint suppressed.) Anyway, let's cope if we encounter an error reading from our socket. Ray Greenwell 2006-07-25 21:23:47 +00:00
  • 426edf6ad7 Moved some of the standard work done by Authenticators into the base class. Ray Greenwell 2006-07-25 19:02:48 +00:00
  • 878129f75d Made a parameter name more descriptive (as well as reversing the meaning...). Ray Greenwell 2006-07-25 02:19:44 +00:00
  • 4d6166dc12 Added a safe navigateToURL method for sending the browser to some page. If the user embeds the flash client on their own page, if someone then clicks something to visit a msoy page, we will be unable to load that page in that same tab/window. Instead, we'll be forced by flash security restrictions to open in a blank window. Allow for either method, falling back to a blank window if the other method fails. Ray Greenwell 2006-07-25 02:10:20 +00:00
  • 5b83ee58a0 Call the proper removal function... Mike Thomas 2006-07-24 23:29:43 +00:00
  • 02113e6eab Allow shutdowners to be removed in case they're no longer interested. Mike Thomas 2006-07-24 23:27:19 +00:00
  • ed1f43bdfc Fixed up a number of TODOs; created a new Wrapped interface to simplify auto-unwrapping. Ray Greenwell 2006-07-24 19:53:24 +00:00
  • fb532c1349 Added missing methods. Ray Greenwell 2006-07-22 00:11:51 +00:00
  • a9109fc4af Added the CLIENT_DID_CLEAR client event. Ray Greenwell 2006-07-21 23:41:12 +00:00
  • e16d838b18 Be sure to generate a DID_LOGOFF event, and a few other bits. Ray Greenwell 2006-07-21 21:28:57 +00:00
  • 85052535b4 Added a CommandMenu, which is a pop-up menu that submits configured CommandEvents for selected items. Ray Greenwell 2006-07-20 02:14:53 +00:00
  • f1f6b3bdb2 Renamed ControllerEvent to CommandEvent. Ray Greenwell 2006-07-20 02:14:14 +00:00
  • 19219bb1a3 Break out the logic for whether the place is empty so we can override it. Mike Thomas 2006-07-20 01:28:29 +00:00
  • 2f9ea3a69e Added a streaming Boolean wrapper. Untested. Ray Greenwell 2006-07-19 23:59:55 +00:00
  • 783b5ef33d Be sure to call super() in our clickHandler so that selected state toggles when toggle mode is true. Ray Greenwell 2006-07-19 22:25:30 +00:00
  • 2dcdebc29b Document the messages broadcast to the server. Michael Bayne 2006-07-19 00:45:51 +00:00
  • 41b73ffcb4 Factored the automatically scheduled reboot code out into a reusable class. Michael Bayne 2006-07-19 00:43:08 +00:00