Menu

#58 function <def>s not working in module-browser pane

closed-fixed
nobody
pythonwin (177)
5
2008-02-26
2003-10-11
Tim Diggins
No

As of pythonwin 157 (at least on my version on
Win2000), when you drag out the left-hand margin to
show the module-browser pane (not sure of correct
python win terminology here), the functions are no
longer displayed, nor work correctly.

Instead they just display <pyclbr.Function instance
at ...> and double clicking on them gives status
line "Can not locate the source code for this object".

The reason for this is that pyclbr.Function used to be an
subclass of pyclbr.Class but no longer is.

Thus an attribute error is raised at the wrong point in
pywin.framework.editor.ModuleBrowser.HierListCLBRClass
(because a pyclbr.Function no longer has redundant
attributes super and methods)

A way to fix this is to mirror the change and give
ModuleBrowser.HierListCLBRFunction its own __init__
and make it inherit directly from
ModuleBrowser.HierListCLBRItem. I include a file with
JUST the necessary changes (the redefinition of
ModuleBrowser.HierListCLBRFunction).

best

Tim

Discussion

  • Tim Diggins

    Tim Diggins - 2003-10-11

    the redefinition of ModuleBrowser.HierListCLBRFunction

     
  • Tim Diggins

    Tim Diggins - 2003-10-17
    • status: open --> open-duplicate
     
  • Tim Diggins

    Tim Diggins - 2003-10-17

    Logged In: YES
    user_id=263040

    Oops - this is the same as #794193. I should have added my
    comments there. The code already submitted addresses
    comments by Christopher J. Prinos (cprinos) to that bug.

    https://sourceforge.net/tracker/?
    func=detail&atid=551954&aid=794193&group_id=78018

     
  • Roger Upole

    Roger Upole - 2008-02-26

    Logged In: YES
    user_id=771074
    Originator: NO

    This appears to have been fixed in ModuleBrowser.py r1.7.

     
  • Roger Upole

    Roger Upole - 2008-02-26
    • status: open-duplicate --> closed-fixed