[Zope-dev] ZopeClient

Tres Seaver tseaver@palladion.com
Tue, 18 Jan 2000 16:52:34 -0600


I am playing with the wxPython client Amos posted as part of his XML-RPC example
(very nice, BTW!) and would like to allow for browsing _all_ objects, rather
than just folders and the two DTML objects.

So, I tried this::
            
    def OnItemExpanding(self, event):
        item=event.GetItem()
        if self.tree.GetChildrenCount(item, false):
            return
        server=self.getServer(item)
        
        # get the list of sub-folders and sub-documents
        try:
            children = server.objectValues( None )
            for child in children:
                print child.id
                if child.isPrincipiaFolderish():
                    childNode =self.tree.AppendItem( item, child.id, 0 )
                    self.tree.SetItemHasChildren( childNode , true )
                else:
                    self.tree.AppendItem( item, child.id, 1 )
        except Exception, e:
            print e
            return

Unfortunately, the XML client library balks at passing None;  so I tried '[]',
but now Zope's special handling for None is not invoked, and I get nothing back.

Can anyone suggest a remedy?

BTW, I have added a Notebook to the right hand page, with pages for Document
Source and Properties.  I would like to change the page tabs on the fly, using
the "manage_options" list, but I'll worry about that later. :)

-- 
=========================================================
Tres Seaver         tseaver@palladion.com    713-523-6582
Palladion Software  http://www.palladion.com