#171 wxpython code completion issues

0.9.8
closed-fixed
5
2005-09-04
2005-08-21
Tero K
No

I have noticed that code completion is imporved but
there are still
couple minor issues left. Both of these seem to be
platform independent, I have noticed these on linux and
windows platforms.
My system configurations are:
1) win2k, python 2.4,wxpython 2.6,eclipse 3.1.0, PyDev
0.9.7.99
2) win2k, python 2.3,wxpython 2.4,eclipse 3.1.0, PyDev
0.9.7.99
3) linux, python 2.3,wxpython 2.6 and 2.4,eclipse
3.1.0, PyDev 0.9.7.99

Bug 1. Code completion does not work with wxpython 2.4,
trying to use it (type self. and press Ctrl+Space)
makes eclipse hang.
This used to partially work on 0.9.7 version. This
stopped working
on last update but wxpython 2.6 started to work almost
perfectly.

Which leads into bug 2:
wxPython code completion shows only directly inherited
member functions. So if I have code :

b=wx.Button(frame,-1,"Button") # inherits/extends
wx.Window.

and I press b plus Ctrl-Space I get 8 completion
methods. However, b is also a wx.Window, and has at
least 20 different member functions. These should also
show.

Ok, enough complaining. I think these are minor issues,
even the missing wxPython 2.4 compatibility is not big
deal when 2.6 works almost perfectly...

Discussion

  • Fabio Zadrozny
    Fabio Zadrozny
    2005-08-21

    • status: open --> closed-fixed
     
  • Fabio Zadrozny
    Fabio Zadrozny
    2005-08-21

    Logged In: YES
    user_id=617340

    I've just checked in some issues on code completion that
    will probably solve part 2. As for part 1, it will probably
    not be supported (and I don't have an earlier version to
    test here...)

    If the bug still persists, please report again.

    Cheers,

    Fabio

     
  • Tero K
    Tero K
    2005-09-03

    • status: closed-fixed --> open-fixed
     
  • Tero K
    Tero K
    2005-09-03

    Logged In: YES
    user_id=1321603

    Well, I hate to be complaining again, but aforementioned
    "bug 2" still
    persists. I mean that all inherited methods on wxwindows
    classes do not show on code completion, just like described
    in original bug report (bug 2).

    I have now tested this only on windows system: win2k,
    python 2.4,wxpython 2.6,eclipse 3.1.0, PyDev 0.9.8.

    Of course this is minor bug, but if you get it fixed then
    PyDev would get even better than it is now !

     
  • Fabio Zadrozny
    Fabio Zadrozny
    2005-09-04

    Logged In: YES
    user_id=617340

    Hummm... strange, for me, it brings all completions...

    Is wxPython on your 'forced builtin libs' in the python
    interpreters?

    Can you give a complete example (with the imports you're
    using of the problems you're facing).

    Also, it may be worth removing the current python
    interpreter and restoring it again (remove, apply the change
    and re-add it).

    Passing to pending until further info is given...

    Cheers,

    Fabio

     
  • Fabio Zadrozny
    Fabio Zadrozny
    2005-09-04

    • milestone: 519167 --> 0.9.8
    • status: open-fixed --> pending-fixed
     
  • Tero K
    Tero K
    2005-09-04

    • status: pending-fixed --> open-fixed
     
  • Tero K
    Tero K
    2005-09-04

    Logged In: YES
    user_id=1321603

    Well, maybe I have somehow corrupted wxPython installation
    and thus code completion does not work perfectly. Here are
    details about my problem , feel free to ask more if I forget
    something important:

    Test code:
    ---------
    from wxPython.wx import *
    import wx

    class HelloWorld(wx.App):
    def OnInit(self):
    frame = wx.Frame(NULL,-1,"hello world")
    frame.Show(True)
    self.SetTopWindow(frame)
    b=wx.Button(frame,-1,"Button")
    return true

    app = HelloWorld(0)
    app.MainLoop()
    --------

    If I now write "app." and hit Ctrl+Space I get following
    completions:
    ---------
    __del__()
    __init__()
    Destroy()
    MainLoop()
    OnInit()
    outputWindowClass()
    RedirectStdio()
    RestoreStdio()
    saveStdio
    SetOutputWindowAttributes(title, pos, size)
    SetTopWindow(frame)
    stdioWin
    thisown
    -------

    So, not all wxApp member functions are listed, full list is on:
    http://wxwidgets.org/manuals/2.6.1/wx_wxapp.html#wxapp

    I feel that this bug is impossible to solve, problem is that
    mine installation is somehow different to Your wxPython
    installation. Maybe it is best to forget whole issue, I can
    live without full code completions :-)

    Rgds,
    Tero

     
  • Fabio Zadrozny
    Fabio Zadrozny
    2005-09-04

    Logged In: YES
    user_id=617340

    ok, seeying your code, was better.. :-)

    you have to add the package wx to your 'forced builtins' in
    the python interpreters (pydev preferences).

    This happens because pydev tries to gather information from
    asts by default, but in the wxPython case, as too much info
    is only available at runtime, you have to specify it to get
    it from the python shell, and not from the ast.

    (if you still have the problem, please, reopen the bug).

    Cheers,

    Fabio

     
  • Fabio Zadrozny
    Fabio Zadrozny
    2005-09-04

    • status: open-fixed --> closed-fixed