Archive for the 'Eclipse' Category
ProggyFonts and Eclipse on OS X
![]()
I’ve tried every way I could think of to get eclipse to stop anti-aliasing the editor font since I started using it over a year ago. I used to use ProggyTiny in my previous editors, as it’s a compact and easy to read font for coding.
I worked out today that ProggyFonts has a version of some of it’s fonts (the best ones) available in apple’s dfont format, which do not get antialiased by Eclipse. Just click on the file icon with the apple in it next to each font where available.
There’s a few little niggles with using these fonts, in your FDT or Eclipse settings, make sure you don’t set any syntax types to display in bold or italic, as the font doesn’t display.
Finally, a decent editing font
I’ve been struggling, since my switch to OS X, to find a decent bitmap small font that is very readable and aliased for OS X.
Today I found ProFont, which is perfect in Eclipse if you set OS X to alias fonts <=10pt.
I’ve also found Anonymous, which is great if you don’t want to turn of anti-aliasing at smaller sizes, it looks great at 11pt.
Anyone else know a good font for OS X coders?
FDT Template
Ever built a class that extends MovieClip, which has no assets in it at compile time? But you still feel you have to place a blank MovieClip in the Flash library bound to this class?
I got sick of doing this each time I create a new MovieClip extending class, so I've taken the FDT template 'create' which normally inserts a static method for attaching your class, but relies on that blank movie and made it work without it. This method also allows you to pass Arguments directly to the constructor function, which you cannot normally do when using attachMovie etc.
An example class looks as follows:
-
class Example extends MovieClip {
-
-
function Example( arg1:String, arg2:Object )
-
{
-
// do something with the arguments...
-
}
-
-
public static function create( container:MovieClip, name:String, depth:Number, init:Object, args:Array ):Example
-
{
-
var mc:MovieClip = container.createEmptyMovieClip( name, depth );
-
if( init ) for( var i:String in init ) mc[ i ] = init[ i ];
-
mc.__proto__ = Example.prototype;
-
Function( Example ).apply( mc, args );
-
return Example( mc );
-
}
-
}
To implement that class, you would do
-
var initObject:Object = { _x: 100, _y: 200 };
-
var constructorArgs:Array = [ 'a string', { value:'a property', value2:'another property' } ];
-
var myExample:Example = Example.create( this, 'example_mc', getNextHighestDepth(), initObject, constructorArgs );
To install this template, download this XML file, open Eclipse, go to preferences > FDT > Editors > Templates, select Import... and select the unzipped XML file.
There are other methods for achieving the same effect, Peter's one is a great example.