Yeah so I had my first real experience with RegExp. Like a timid, prepubescent girl I quickly glanced the LiveDocs for RegExp, only to quickly giggle, blush and run off to tell my other little friends. No really, I was a complete noob.
Today I couldn’t run off to something else. A task dictated that I learn it. But luckily I had an experienced RexExp developer there along my side. So now I am really intrigued. And like some poor guest on the Maury show, I have tasted it and I want more… ok ok, so enough with the analogies.
Anywho…. So I know there are probably tons of these free tools out there, but I figured I would add another RegExp explorer for AS3. Let me know if it sucks. Maybe I will update it.
Teehee
Filed under: actionScript
Preface: This may be common knowledge and have several dozen posts on it, but since I found this out on my own, I figure I would post on it.
Now I am not what you call an ActionScript know-it-all. In fact, I learn something nearly everyday about AS3 and Flex. That’s why I love my job. So I ran into an issue where I was using isNaN expecting to get true. Various values were getting passed in but I wasn’t getting consistent results. Why?
Well part of that was that I was passing int(s) as values. I hadn’t initialized the var to anything. I just said var i:int; much like we might define var n:Number; and its initialized value would be the numerical equivalent to null which is NaN.
Little to my knowledge this was occuring:
var n:Number;
trace(isNaN(n)); //true, because the default value of a Number is NaN
var i:int;
trace(isNaN(i)); //false, because int defaults to 0, not NaN
Cool tip? I’d like to think so. Anywho…
Filed under: Uncategorized
Thank MXNA for dropping my blog from your services
Filed under: Uncategorized
This is a test post to test the blog aggregators. – Jwopitz
Ok, so its been nearly a month since I last posted. I have been in a royal funk lately.
So there had been some interest in the whole Sequence Command thing awhile back. And I had never really followed through. So now that I have some free time, I am reviving the initiative. If you like, you can get a refresher (part a, part b). But today’s post is going to be more of a request for input from fellow developers. So let’s get started.
So the issue currently is this: I am wanting to enforce a contract for those who plan to use this ‘framework’ (for lack of a better word). Contract immediately sparks to mind the term interface. But I feel that an interface is too loose, too democratic, too free. Specifically I want the developer to make sure to dispatch the following events on their respective triggers:
- CommandBaseEvent.EXECUTE
- CommandBaseEvent.FAULT
- CommandBaseEvent.RESULT
If I were to make the CommandBase class an interface (ICommandBase?) then I would have to rely on developers to make sure to dispatch those events themselves. If I were to go the inheritance route, I would still have to rely on developers to make sure to call the super’s methods that are getting overridden. So I am a bit stuck and having an OCD moment here. What to do? Should I:
- use an interface
- use inheritence
- use an interface that require dispatchEventMethods such as dispatchExecuteEvent, dispatchFaultEvent, dispatchResultEvent
I would love some input from the community.
