Thursday, July 20, 2006

Yet Another Mozilla Build Error

Just to get it findable by google for the next hero who fails building Mozilla.

../coreconf/rules.mk:406: target `c' doesn't match the target pattern
../coreconf/rules.mk:407: warning: overriding commands for target `c'
../coreconf/rules.mk:366: warning: ignoring old commands for target `c'

is probably caused by a wrong make version. You need make 3.80.
thanks gavin

(added to developer FAQ wiki)

Tuesday, July 11, 2006

Javascript members constructor

I know this may seem obvious but I forget it everytime. So this is a reminder for myself and others. It takes a while to track this if you don't know it.

function MyClass () {}
MyClass.prototype = {
memberA : new Array();

function MyClass () {
this.memberA = new Array();
MyClass.prototype = {
memberA : null

It's not that the first (red) is bad, it's just probably not what you want. In the red case there is one static memberA shared on all instanses of MyClass. In the green case memberA is just a normal member for each created instance.

Archive: current  October 2005  November 2005  December 2005  January 2006  February 2006  May 2006  July 2006 
Previously on Epigoon: Yet Another Mozilla Build Error  Javascript members constructor  New minimeter beta  Google Maps does rest of Europe?  Minimeter update  Geo browsing  Geo status indicator  Google Talk Maps  Minimeter and Feedview on CVS  Firefox 2.0 will include Feedview