As nothing’s as straight forward as PHP, I had to write my own class to sort ArrayCollections. My work was inspired by what Peter Dehaan did.
The method is to be used as follows:
ArrayUtils.sort(games, "playerScore", "DESC", true);
to sort an ArrayCollection of games by player score, with a de ...
In Flex (as in Java, or even PHP) you can dynamically get references to a class from its name. Just to remind you, it’s that easy in PHP:
$className = 'User';
$myUser = new $className;
Not a lot more complicated in Java:
Class className = Class.forName("User");
Object myUser = className.newIns ...
As I was writing some Java code for my finale dissertation, I wanted to give my objects an unique ID in order to distinguish them easily. I thus wrote the following abstract class that does the job well for me:
package motd.utils;
/**
* Makes a class identifiable with an unique ID for its ob ...
I was writing a bit of Javascript this afternoon. Everything was fine until it came to test it on IE, and there the nightmare began (again, and again, and again…). Yes, IE (all versions) sucks at handling onChange events for checkboxes and radio buttons. Sometimes it works, sometimes not at al ...