Splitting CSVs in Actionscript (the Excel way)

October 21st, 2008 · 1 Comment

Ever needed to split CVSs in Actionscript? Tried using String.split()? Using a CSV from Excel I had the problem that String.split() does not support to use the delimiter inside of the value fields (Excel puts double quotes around fields that contain the delimiter). After playing with some regular expressions I made a textSplit() method that [...]

[Read more →]

Topics: · , , , , , , , , ,

Factories für Event-Handler in AS3

July 10th, 2008 · No Comments

In meinem letzten Projekt ist mir ein nettes Pattern für die Verwendung von Closures in Actionscript 3 eingefallen: Factories für Event-Handler. Hier ein sehr einfaches Beispiel für einen Handler, der einen Alert anzeigt: public static function createAlertHandler(text:String, title:String):Function { return function():void { Alert.show(text, title); } } Das Ganze kann man sich nun in der Praxis [...]

[Read more →]

Topics: · , , , ,