Customizing toString()

September 8th, 2008 11 comments

When writing classes for a framework I usually put a custom toString method into important classes so that debugging becomes easier. Normally they would go like something along the lines of:

override public function toString():String {
	return "[ClassName]";
}

… Sometimes adding properties to the returned String that give back information about the class, e.g.

override public function toString():String {
	return "[ImageClass, size=" + _size + "]";
}

But writing them rigid like that is a disadvantage when you decide later to refactor class names. Admittedly it’s also not a very elegant way so I got the idea to take the class name that is returned by getQualifiedClassName(). The only problem is that getQualifiedClassName not only provides the type name but also the whole package String of the class. Regular Expressions to the rescue! After twiddling around with them for a while (I’m by no means a RegExp expert) I got my toString method into the shape that I desired:

override public function toString():String {
	return "[" + getQualifiedClassName(this).match("[^:]*$")[0] + ", size=" + _size + "]";
}

This way it matches the String returned by getQualifiedClassName with the Regular Expression [^:]*$ which checks from the right end for an arbitrary text up to the first occurring colon, but without including the colon. Taking the first element of the Array returned by match() and you got what you need!

A nice way of using this is when writing abstract classes that contain the toString method and any subclass can use that toString method without the need to override it … that is of course unless you want ot add other output information.

Aw Snap! This site is not meant for you!

September 6th, 2008 9 comments

Chrome, the new snazzy browser from Google is currently in everyone’s mouth and most people who had a look at it seem to be impressed so I decided to give it a go, after all it can’t be so bad, right?

Chrome installs right onto your system from the website and then takes over (or if you are cynical: steals) all the bookmarks, history, passwords etc. from Firefox (to make your life easier). It then opens with a slick and slender window that lacks all the tackiness of a plugin-convoluted Firefox. When opening a new tab it shows a neat history list with thumbnails of your most recent visited websites. Chrome starts up as fast as a finger snap! Maybe even faster! Can it get any better?

Read more…

Categories: Misc Tags: ,

Alcon 3 Out Now!

August 25th, 2008 4 comments

It took longer than expected thanks to obstacles like a crashed harddisk and other minorities in between but it’s finally done and I now can announce the immediate availability of Alcon 3! It runs currently on Windows and Mac and hopefully soon on Linux too. When I tested it on Ubuntu it installed and started fine but the LocalConnection seems not to cut it in the current alpha release of the Linux AIR Runtime. Anyone know more details about this?

I recommend to check out the Alcon Page for more details and of course the download link. Enjoy your debugging!

Categories: Dev Tags: , , , ,

Alcon 3 Preview

August 21st, 2008 11 comments

Since so many of you (well, at least four people) are feverishly waiting for the release of Alcon 3 here’s a preview screenshot to comfort your waiting time. The shot shows Alcon’s trace output panel with some bogus Array being traced iteratively and as a hex dump. the top of the window displays Alcon’s new App Monitor which can be used to monitor framerate, frame render time and memory consumption. It also shows the version of the runtime that the monitored application is run in (clicking on the version text will list all System.capabilities properties in the Trace panel).

Then there’s the Options dialog with Trace options opened where you will be able to set font, colors etc. On the File Loggers Options you will be able to optionally enable up to two File Loggers that can be used for example to log the flashlog.txt to see output made by ActionScript’s own trace method.
There’s of course the new Object Inspector and a new Help panel for Quickstart Help and API Docs. Alcon 3 is being written 99% in ActionScript 3 using FDT (the 1% left being the Main.mxml that is necessary to compile a Flex application). It’s only a matter of a few days now until release, some bug fixing, finishing touches and a few more documentation to write and it will be out so please endure!

Categories: Dev Tags: , , , , ,

Announcing Alcon 3

July 23rd, 2008 7 comments

Alcon 3 is in the works! The new version is being written for Adobe AIR and that means no more hackish OS integration! Thanks to AIR the debugging tool will run nice and smooth on any supported OS and it will restore your windows size and position where you last left it, Stay On Top works properly, auto-update etc. etc. etc.

Some of the new features besides the already existing Trace Command and File Loggers are a Memory Consumption and Frames-Per-Second Monitor, a completely new and improved Object Inspector that is finally useful for Debugging, an Options dialog to comfortably configure Alcon, proper AS2 support and a couple of other minorities here and there.

The progress moves on quick enough that I dare to say that the release date is only a few weeks away from now so sit tight, it’ll be there in a heartbeat.

Categories: Dev Tags: , , ,

Dude, where is my blog?

July 22nd, 2008 No comments

In case you’re wondering what happened on this site besides that it has been visually overhauled … two of my older blogs have now been merged with Hidden Resource. One, Dataleak, was my very first blog that I used for mainly writing about computer games, especially old ones. However Dataleak turned more and more into a abandoned net corpse and because there were quite some articles on it which I found have nostalgic value I decided to take them over to HDRS. Then there was Vista Tweaking, a blog I’ve started to post tweaks for Windows Vista. The few postings from that site have been consolidated into HDRS as well. I also had the idea on the back burner about starting an audio blog since audio production is one of my many interests. But a man has only so much time and maintaining three or four blogs is clearly a chore. Just think about all the updates, handling Spam etc.

Read more…

Categories: Misc Tags: ,

Tutorial: Creating a Galaxy in Photoshop

July 20th, 2008 56 comments

In this tutorial I will explain how to create a relatively realistic looking galaxy with Photoshop. I was searching the web up- and downwards to find any tutorials that could tell me how to get a similar fantastic result. There are like 100.000 planet tutorials out there and the few tutorials which were about creating a galaxy where either very basic or the result looked like everything but a realistic galaxy. The galaxy I wanted should have looked massive and intricate … just like the real ones but with a slightly more artistic touch. I’ve needed a galaxy that I could use as a star map for a space-themed roleplaying game design and the image you see above is a part of the result. Let’s go try to do such one …

Read more…

Using Kore 2 more efficiently with User Tags

July 16th, 2008 No comments

Kore 2 from Native Instruments is probably every sound organizer’s wet dream with sugar on top. Not only  can it control a multitude of Softsynths but it’s database makes it easy to organize sounds and find them quickly when needed. I’ve purchased this nice tool last December and what’s better than telling a few details on how I put it’s features to good use?!

Read more…

Categories: Audio, Featured, Random Picks Tags: , ,

Facelift for Ableton Live

July 11th, 2008 1 comment

Download: dark & modern looking UI skin for Ableton Live 6/7.

A while back I’ve created a custom skin for Ableton Live with this handy freeware skin editor. The editor dates back to Live 6 but it seems that skins made with it work just fine in Live 7. Live’s approach to UI design is very minimalistic which I think is a step into the right direction but the default color palettes are not everyone’s taste. I’ve been using this skin since a couple of months and it works nicely so here is Dark2008, a dark – but readable – theme for Ableton Live 6 and 7.

Read more…

Categories: Audio, Featured, Random Picks Tags: , ,

Font Creation with Flex

May 18th, 2008 No comments

Fontstruct is an online font creator whose editor has been obviously developed with Flex. Users can register and design their own fonts which are made available for download. Looks slick!

Categories: Design Tags: , ,