[Project_owners] Question: Mozilla Development

Paul Roub paul at roub.net
Thu Mar 24 16:16:14 EST 2005

 > When developing Moz code what editor do you use?

Visual SlickEdit when I'm under Windows; Emacs under Linux.

 > What platform do you use for primary development?

Switch back and forth about equally between WinXP, Debian and RedHat. 
Whichever's most convenient from my current location / setup.  Cygwin 
tools allow make, sed, etc. to function the same wherever I am.

 > How would you actually write this code?

var     prefSvc = Components.classes["@mozilla.org/preferences-service;1"];
var     prefs = prefSvc.getService(Components.interfaces.nsIPrefBranch);

The multi-line, many-many-dereferences style gets pretty opaque to my eyes.

I'd usually copy and paste something similar from my own code; failing 
that, XULPlanet; failing that, LXR time.

 > How do you obtain the contractID or interface to use to instantiate a
 > component?

LXR, XULPlanet, Google

 > How about if you were writing a new XUL file from scratch, how would
 > you do it?

 From scratch, but based on examples of similarly-functional files from 

 > Let's say you wanted to add the code below, how would you do it?

See previous answer.

 > Is the rule "-moz-image-region" committed to memory or a search and
 > paste action?

Search and paste.  The CSS itself, from memory.

More information about the Project_owners mailing list