Snippets code from my daily experience

August 7, 2008

Alea iacta est: OpenKomodo localized

Filed under: babelzilla, komodo, localization, openkomodo — dafi @ 6:59 pm

Alea iacta est the first OpenKomodo lang pack has landed.

I’ve already spoken about KomodoEdit localization and now the french Babelzilla team has terminated the first version, the official announcement has posted at Mozilla Europe site.

I’m very happy, I’ve developed macros to simplify lang pack testing and created a simple webapp to convert babelzilla locale tarballs to installable xpi langpacks.

Maybe ActiveState guys hate me because the translation idea started from me, but I believe localized (and open) softwares are simpler to use in schools, poor information environments and any low profile educational eco-systems.

The italian lang pack is coming soon, I will be very proud to use KomodoEdit in my mother tongue.

I hope other localizations can arrive very soon

July 12, 2008

KomodoEdit localization

Filed under: babelzilla, localization, openkomodo — dafi @ 8:01 am

I’ve asked to babelzilla community if they are interested to translating KomodoEdit and immediately they reply to me that this is possible.

So I’ve posted into Komodo forum to understand if ActiveState is interested, too.

Well, all is ready and I’m glad to have started this process.

I don’t know what this experiment will produce but I’m happy to see collaborations between so different communities.

I hope to see very soon the first KomodoEdit in non english language :-P

March 15, 2008

Komodo and readonly behavior

Filed under: extension, komodo, morekomodo, mozilla, openkomodo, scintilla — dafi @ 12:30 pm

Komodo editor handles read-only in a incomplete manner, at least for me.

The truly question is “what read-only means?” A file can be read-only but also an editor buffer can be read-only.

Komodo handles read-only files is a smart way, it opens file and shows a little lock on editor tab but user can edit the text buffer, it isn’t marked as read-only.

If user tries to save a warning message pops up allowing to choose if saving must be forced or cancelled.

Cool sure but I want to mark editor buffer as temporary read-only irrespective to file flag, this feature is missing on Komodo but scintilla has a readonly property.

I’ve added to MoreKomodo the ability to mark editor buffers as “edit locked”.

I think “edit locked” sounds good then “buffer read-only”.

The code is straightforward, simply sent the scintilla readonly property as shown below

     onToogleLockEdit : function() {
        var view = ko.views.manager.currentView;
        view.scintilla.scimoz.readOnly = !view.scintilla.scimoz.readOnly;
    }

February 14, 2008

Extend Firefox 2 Contest and other surprises

Filed under: firefox, mozilla, openkomodo, table2clipboard — dafi @ 9:06 pm

January and February are very important months for my programming activites.

In January ActiveState guys gave me a KomodoIDE license for my contribution to their OpenKomodo wiki, a great unexpected surprise, the first one.

A couple of days ago Mozilla published the Extend Firefox 2 Contest and I discovered my name on “Runners up” list, a great
unexpected surprise, the second one.
I can figure out ViewSourceWith is the winner, no! The winner is Table2Clipboard my outsider extension, a great unexpected surprise, the third one.

I’m happy that other people appreciates my work.

My feed reader alerts me, LifeHacker has new contents, I take a look and found they speak about Table2Clipboard, a great unexpected surprise, the fourth one.

ActivateState gave me a KomodoIDE license, EF2 prices contain a KomodoIDE license, now I have two KomodoIDE license, another surprise the fifth :D

Mumble mumble… may I sell the unused license?

January 7, 2008

OpenKomodo namespace API

Filed under: komodo, openkomodo — dafi @ 7:30 pm

When you want to write extensions or macros for OpenKomodo you discover many new XPCOM interfaces to use, they are so much that you can be confused.

Komodo programmers fortunately have simplified XPCOM usage wrapping a bunch of them in easy-to-call functions.

These function are incapsulated in namespace as modern Javascript dictates, every namespace can contains several functions.

Table below shows OpenKomodo namespaces, good luck ;-)

Namespace Description
ko.browse Functions to launch browsers
ko.commands Functions to handling commands
ko.dragDrop Functions to handle drag&drop of files onto Komodo
ko.eggs Easter egg
ko.filepicker Functions to wrap nsIFilePicker
ko.help Functions to simplify launch help pages
ko.inputBuffer Functions to capture user input while a slow XUL window is loading
ko.interpolate Functions to easily use the KoIInterpolationService from JavaScript
ko.isearch Functions to handle incremental searches
ko.launch Functions to launch dialogs like Extension Manager, Watcher, Diff
ko.lint Functions to access lint from Javascript
ko.logging Functions to access the logging system from Javascript
ko.main Functions to hook Komodo startup/shutdown
ko.markers Scintilla image markers used in Komodo
ko.mru Functions to handle MRU
ko.open Functions to open buffer editors
ko.printing Functions to handle printer
ko.run.output Functions to handle run output window
ko.statusBar Functions to handle status bar
ko.stringutils Functions to work with strings
ko.uilayout Functions to handle various UI features
ko.uriparse Functions to convert/parse strings representing URLs
ko.window Functions to get window informations
ko.windowManager Functions to handle windows

Blog at WordPress.com.