Some of you wrote me saying my site was telling you to install the Flash Plugin even though you already had it installed. Apparently, the MTGotoAndComment Flash form I use for comments to avoid blog spambots had a weird class id which caused havoc. My man Jeff found this, although, I’m not sure how. Regardless, it’s fixed now; sorry for the hassle.
Blog
-
Can’t wait for Zorn? Get FDT!
The development tool for for Flash, FDT could replace the “A” in FAME. Typically, one would use ASDT (ActionScript development tool) for code hinting, coloring, and creation/recognization of ActionScript in Eclipse.
They have a lot of great demos done in Captivate, and documentation if you care to read instead.
-
Battlefield 2: Fix a memory leak with more RAM
The problem with drugs is one knows they are bad, but they keep using them; repetitive, self-destructive behavior.
Same thing with me playing Battlefield 2; it crashes EVERY GAME, but I enjoy it so much that I keep re-launching it. After removing the intro demo movies, the launch time is quick enough that I can get back into the action in 1 minute. However, I’ve already lost 1 keyboard, and got syrup on my carpet in response to the crashes…
Upon a classic “sound repeats, game locks up”, I did a Control+ALT+Delete to see how much RAM & CPU BF2 was using. I noticed 387megs of RAM, which was extremely telling because I had ALL the settings down, but probably had left Tomcat (40 megs), Apache, and a plethora of other background services running, quickly filling up my
500 megs1 gig of RAM.My guess is, once she hits the page file, she yukes. I installed and additional
500megs1 gig of RAM last night bring it up to12 gigs.No crashes.
So, if you are sick of waiting for patch 3 of 15 to make the game even more playable, just get more RAM! (assuming you already have a beastly CPU & Video card)
-
ARP: Controller vs. Glorified Hashmap
Good discussion over my blog that spilled to email with Grant Davies. He did a coup de grace whilst I drank watered down coffee on my ARP mods. He called my modified ARP Controller a glorified hashmap, and he’s right.
The Controller in ARP responds to events made from View’s, and runs Commands when those events happen. You click the Submit button, it dispatches the click event. The Controller is listening for the click event, and runs the Login command. Your atypical MVC Controller; listen to events, trigger code to respond to those events.
I’m faced with a challenge which I’ll probably solve while writing this. Since my changes, the Controller is no longer a controller in the traditional sense. It merely holds command classes in a hashmap (ActionScript Object), and allows you to run them (instantiate the class, optionally passing parameters). That is not a Controller.
To reiterate the reason I did this to give some history and context, I felt that when writing dispatchEvent in my View’s, it shouldn’t imply anything. To me, event names are spur of the moment, just like naming variables; “What should I call this that’ll make sense, fall more to the verbose side vs. the brief side, and overall make sense?” In ARP, however, this choice carries with it the addition of knowing this event may eventually end up being mapped to calling a Command in the Controller. I didn’t like this, at least for those high level View’s that would be considered emitting system events. Granted, you wouldn’t have to worry about a Button’s click event triggering a command, but your Login component could trigger a command by its click event.
Peter Hall and I had Aral note our distress, and he in turn suggested we use handleEvent which would allow us to intercept any events and do the mapping ourselves if we so chose. Since handleEvent is called before the actual event on an event listener using EventDispatcher in Flash/Flex, it’s a nice, low-level way to get more control of your events.
At this point, I may have to re-examine that as an option.
Typically what I’ve been doing is making an Application class; whether extending my ApplicationTemplate, or Flex’ Application.mxml. This holds all initial logic to create the main GUI’s, who in turn holds all other View creation/destroying, and manages listening to events and running commands; in effect, it’s a Controller and a View in 1; not so strange in Flash. Many purists do not like doing this since a Controller should be a controller and just a controller, and I understand perfectly why. ARP being lightweight enough allows me to bend the rules to my liking.
However, I don’t think I can bend word definitions however; Controller is no longer such, and without multiple inheritance, I cannot have mx.core.View & Controller become one and the same without using an mix-in which most people, except me, hate.
…ok, that didn’t work, writing it out didn’t solve it. Perhaps if Controller extended mx.core.View instead of Object, I could use it as my base View/Controller class since most of my apps are Form based anyway, this would work out well. Back to the lab.
Community input, rocks!