hola tengo un error que me dice que no esta definido la variable
  
Código:
 Traceback (most recent call last):
  File "C:\Users\oscars\Documents\NetBeansProjects\PythonProjectIDE\src\Ribbon.py", line 862, in OnMouseMotion
    nPos = (self.wdPos.x + (dPos.x - self.ldPos.x),self.wdPos.y + (dPos.y - self.ldPos.y))
AttributeError: 'Ribbon' object has no attribute 'wdPos'
  no se porque pasa si esta bien definida o ¿no?   
Código python:
Ver original- def OnMouseLeftDown(self, event): 
-         self.Refresh() 
-         self.wdPos = self.ClientToScreen((0, 0)) 
-         self.ldPos = event.GetEventObject().ClientToScreen(event.GetPosition()) 
-          
-         self.CaptureMouse() 
-   
-     def OnMouseMotion(self, event): 
-         if event.Dragging() and event.LeftIsDown(): 
-             dPos = event.GetEventObject().ClientToScreen(event.GetPosition()) 
-             nPos = (self.wdPos.x + (dPos.x - self.ldPos.x),self.wdPos.y + (dPos.y - self.ldPos.y)) 
-             self.Move(nPos) 
-   
-   
-     def OnMouseLeftUp(self, event): 
-         self.ReleaseMouse()