[wingide-users] Auto-completion of wxPython classes during ed iting?Wing IDE Support support at wingide.com
29 May 2003 12:55:44 -0400
This is caused by a bug in Wing related to finding base class information when the base class is imported. There is a fix for it available from our download page at: http://wingide.com/support/downloads_list&prod=wingstd&version=1.1.9§ion=bugfix The bugfix is #7. To install it, extract the files from the tar file into the Wing's install directory (typically c:\Program Files\Wing IDE on Windows and /usr/lib/wingide on Linux). Use the folder names when extracting so the actual files are put into the correct subdirectories. Thanks for the bug report, John On Wed, 2003-05-28 at 18:09, David Bolen wrote: > Thanks for the response - my test project properties do not have an explicit > path but appear to be set to 'Use "python"' and 'Use environment' - I didn't > change them from whatever creating a new project gave me. Using "python" on > my system is set to yield 2.2.2, and a check in the Source->Show Analysis > Stats window shows that it's finding my interpreter and path. > > While I've certainly modified sys.path dynamically in the past, in this case > wxPython is in the standard lib/site-packages/wxPython location beneath my > Python root. If that was the problem, would you still expect Wing to tell > me about __init__, this, and thisone? Those are part of the wxStaticText > class which is in the same module (in the wxPython installation, > controls.py) as the superclass having the more interesting methods. > > Just for reference, here's the small test module I had narrowed my testing > down to - I've noted in comments where the completion worked as expected, > and the wx case where it didn't. > > - - - - - - - - - - - - - - - - - - - - - - - - - > > from wxPython import wx > > class testing: > > def foobar(self): > pass > > def blah(self): > pass > > def last(self): > pass > > > class subclass(testing): > > def __init__(self): > # Completion works fine here > self.blah() > > class mystatic(wx.wxStaticText): > > def __init__(self): > # XXX Tried typing "self." here but can't see all methods > pass > > - - - - - - - - - - - - - - - - - - - - - - - - - > > And here's a small snippet of the wxPython (I'm using 18.104.22.168) controls.py > module containing that class definition. Note that Ctrl-Right-Clicking on > the wx.wxStaticText class reference above does take me right to this code. > > - - - - - - - - - - - - - - - - - - - - - - - - - > class wxStaticTextPtr(wxControlPtr): > def __init__(self,this): > self.this = this > self.thisown = 0 > def Create(self, *_args, **_kwargs): > val = apply(controlsc.wxStaticText_Create,(self,) + _args, _kwargs) > return val > def GetLabel(self, *_args, **_kwargs): > val = apply(controlsc.wxStaticText_GetLabel,(self,) + _args, > _kwargs) > return val > def SetLabel(self, *_args, **_kwargs): > val = apply(controlsc.wxStaticText_SetLabel,(self,) + _args, > _kwargs) > return val > def __repr__(self): > return "<C wxStaticText instance at %s>" % (self.this,) > class wxStaticText(wxStaticTextPtr): > def __init__(self,*_args,**_kwargs): > self.this = apply(controlsc.new_wxStaticText,_args,_kwargs) > self.thisown = 1 > self._setOORInfo(self) > > - - - - - - - - - - - - - - - - - - - - - - - - - > > Thanks for any other suggestions - just let me know if I can provide any > other information. I'm hoping from your response that the idea is that in > theory Wing ought to be able to provide full completion in this case. > > -- David > > -----Original Message----- > From: Wing IDE Support [mailto:firstname.lastname@example.org] > Sent: Wednesday, May 28, 2003 5:45 PM > To: David Bolen > Cc: 'email@example.com' > Subject: Re: [wingide-users] Auto-completion of wxPython classes during > editing? > > > Hi, > > Have you checked whether you've got the Python Path in Project Properties > set up to match the path at runtime? If your code does things like > os.path.append() or otherwise sets up the path to find wxPython modules > then Wing may not be finding the superclasses you're using. > > I'm not 100% sure this is the problem you're seeing but it's the first > thing to check. Let me know if that doesn't help. > > Thanks, > > Stephan Deibel > > -- > Wing IDE for Python > Archaeopteryx Software, Inc > Take Flight! > > www.wingide.com
Run by Mailman v 2.0.8
Copyright (c) 2000-2002, Archaeopteryx Software, Inc.