[Zope] RE: [Zope-Moz] Good news for Zope/Mozilla efforts!

Michael McLay mclay@nist.gov
Wed, 24 May 2000 17:34:14 -0400 (EDT)


David Ascher writes:
 > There are two levels of integration of other scripting languages, one easier
 > than the other.  We'll be tackling the ability to make XPCOM components in
 > Python and Perl first.  

Would you please expand on the "make XPCOM components" task.  By
this are you adding new components, written in Python, that will be
accessible through the XPCOM interface?  Would these components be
constructed in Python from components interfaces that are accessible
through the XPCOM interface?  If this isn't the case then is does this
simply mean that Python can be used to assemble chrome using existing
XPCOM components.

Are you doing this by wrapping the the interface to the XPCOM Type
Library or will you be parsing the XPIDL files directly.  (Another
interesting approach is the way the ORBit-Python project reads CORBA
IDL files at run time and links directly to an ORBit ORB.)

 > This doesn't allow the use of those languages in a
 > XUL file, however, as that requires architectural changes to the Mozilla
 > core.  We will be working with Netscape to solve that problem as well, but
 > not in the short term.  Nevertheless, I think you'll be pleased to see what
 > can be accomplished with Python and Perl components...

By this do you mean that in the following XUL the value of "oncommand"
cannot be python code?

  <menuitem 
    value="Mozilla Help" 
     oncommand="window.openDialog('chrome://help/content/help.xul', 
                                  '_blank', 
                                  'chrome,all,dialog=no')" />

or are you talking about not being able to embed Python instead of
javascript as in the following:

  <script language="javascript">
     function doCMD(el) {
             v = el.getAttribute("value")
             if (v == "New") alert('New clicked') 
             elsif (v == "Open") alert('Open clicked') 
             else alert('Close clicked') 
     }
     </script>
     ...
       <menu class="menu" value="File" oncommand="doCMD(event.target)">
         <menupopup>
             <menuitem oncommand="alert('New item alert')" value="New" />
             <menuitem value="Open" />
             <menuitem oncommand="alert('Close handler')" value="Close" />
         </menupopup>
       </menu>

Instead of using XUL to write the <menuitem...> definition from the
first example or the <menu...> definition in the second example will
it be possible to write the equivolent of the XUL completely in
Python?  That is, will the planned interface make it possible to build
an XPCOM component based application, such as the Mozilla browser,
entirely in Python. 

An interface between the Glade IDE and Mozilla has recently been
checked into Sourceforge.  The documentation on MozGlade is weak.
The freshmeat announcment
http://freshmeat.net/appindex/2000/05/16/958529719.html hints at the
goal.  The project looks like it might intersect with the goals of the
Komono IDE project.  

Will there be a mailing list for the project?  What is your best guess 
on when the "make XPCOM components" capability will be available for
testing from the Mozilla CVS?