ActiveState Powered by ActiveState

ActiveState Community


Extension development essentials

Posted by jeffg on 2008-03-25 14:58
OS: All / Any

I decided to post these tips after observing how nice and streamlined my Komodo hacking has become lately.

1. Run two copies of Komodo. If you don't have installs of IDE and Edit, you can always launch a separate instance of Edit with new prefs by setting the KOMODO_USERDATADIR environment variable. This allows me to have my extension project and code open in the main Komodo instance, while using the second instance for testing my changes ( which requires a re-start ).

2. Install the Extension Developer's Extension:

http://community.activestate.com/komodo-extension/komodo-developer-exten...

This extension ported by Todd over to Komodo gives you some killer tools for extension dev, in particular for me the JS shell.

3. Un-jar your code and edit it directly in the prefs directory. To make this simpler I actually add the extension directory from the testing instance of Komodo's prefs as a Live Folder in my extension project.

4. Hack things up in Macros first. Prototyping your code as a macro will save time by removing altogether the need to re-start Komodo to see your changes.

Any other tips?

Stan | Tue, 2008-03-25 17:54

These are some very useful tips, thanks Jeff. ) I find it very convenient to assign a key binding to a macro. This will allow you to trigger the macro without going into the toolbox. If you are like me and you like to test every single line of code you type this is a time saver.

) If you extension requires the use of XUL I find XUL Explorer very helpful: http://developer.mozilla.org/en/docs/XUL_Explorer. This handy tool allows you to prototype your design.

) Use Shift + F1 to get context sensitive help from developer.mozilla.org

dafi | Sun, 2008-03-30 12:20

You can dramatically reduce Komodo restart by setting the pref

user_pref("nglayout.debug.disable_xul_cache", true);

Add it from about:config (see here)

After this setting you need to restart only if modifications are on main komodo.xul.
Every modifications on css(s), xul dialogs, locale files are effective without restart

--
dafi
Enhance KomodoEdit with MoreKomodo

-->