[Zope] newbie : dtml-document properties ?

Stuart 'Zen' Bishop zen@cs.rmit.edu.au
Tue, 28 Sep 1999 14:43:41 +1000 (EST)


On Tue, 28 Sep 1999, Stuart 'Zen' Bishop wrote:

> Which is why I'm trying to fix the bug. I thought it would save time
> in my quest to learn DTML, and I havn't found an online reference that
> doesn't list just the same broken information. I'll post a patch to
> the collector and this list if I work it out ;-)

Buyer beware - this 'patch' was written by someone who doesn't (yet)
know what they are doing and has been stuck at home with the flu for
the last 5 days. It may be worth waiting to see if the Collector accepts
it :-)

http://my.zope.site/HelpSys should have a more useful object reference with this patch. I think that it might be displaying too *much* information now, but it is more useful to me this way than the way it was (since I'm trying to learn this product and without it the only way of learning how to do something trivial like retrieve an object's URL was to ask the mailing list or grep through the source code).

Patch to lib/python/HelpSys/ObjectRef.py - change the body of get_method_list in the ObjectItem class to the following:

def get_method_list(self):
    rdict=classobject.get_method_dict(self)
    rlist = []
    keys=rdict.keys()
    keys.sort()
    for key in keys:
        fn=rdict[key]
        if not hasattr(fn._obj_, '__doc__'):
            continue
        doc=fn._obj_.__doc__
        if hasattr(fn._obj_, '__class__') and \
            fn._obj_.__class__.__doc__ is doc:
            continue
        rlist.append(rdict[key])
    return rlist


 ___
   //     Zen (alias Stuart Bishop)     Work: zen@cs.rmit.edu.au
  // E N  Senior Systems Alchemist      Play: zen@shangri-la.dropbear.id.au
 //__     Computer Science, RMIT 	 WWW: http://www.cs.rmit.edu.au/~zen