API change: "koIView.document" is deprecated, use "koIView.koDoc"

Trent Mick <[email protected]> Mon, 26 Apr 2010 15:00:38 -0700
Newsgroups gmane.comp.ide.komodo.general
Message-ID <[email protected]>
A note for Komodo developers (of Komodo itself, macros and extensions). 
Komodo's "koIView.document" has been deprecated in favour of 
"koIView.koDoc". This will be official in Komodo 6.0.0b1. The former 
will still work (but you'll get a deprecation warning in the log file).

Basically this was done because "document" is waaay too confusing in 
JavaScript code with the DOM Document object called "document".

This also affects the "komodo.document" argument in JS and Python 
macros. For Komodo 6, please move to using "komodo.koDoc". If you still 
need Komodo 5 compatibility, then you can continue to use ".document" 
(and live with deprecation warnings) or you could switch to 
capability-detection style code like:

   # JavaScript
   var koDoc = (komodo.koDoc === undefined ? komodo.document : 
komodo.koDoc);

   # Python
   koDoc = (komodo.koDoc if hasattr(komodo, "koDoc") else komodo.document)


Cheers,
Trent

-- 
Trent Mick
trentm at activestate.com
http://trentm.com/blog/
_______________________________________________
Komodo-discuss mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss