Package peppy :: Package actions :: Module pypefind :: Class PypeFindReplaceAdapterMixin
[frames] | no frames]

Class PypeFindReplaceAdapterMixin

object --+
         |
        PypeFindReplaceAdapterMixin
Known Subclasses:

Mixin object for both FindBar and ReplaceBar to map some functions that pype requests from the main pype object to our instance of a Minibuffer object.

Instance Methods
 
readPreferences(self)
Overrides pype's readPreferences in order to hook into the setup of the object.

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

readPreferences(self)

 

Overrides pype's readPreferences in order to hook into the setup of the object. This is called before the pype.findbar.ReplaceBar.setup routine, so we can use this hook to reset self.parent to our adapter object: FindMinibuffer.

It's a bit tricky, and unfortunately I wasn't able to treat pype's findbar as a black box. At __init__, self.parent points to the parent wx.Frame object and is used in the constructor for the wx.Panel that pype.findbar.ReplaceBar is based on, but after that, self.parent isn't used in that capacity. So, we can point self.parent to our adapter object and then extend the adapter object to do what pype needs.