| @@ -92,7 +92,7 @@ private: | |||||
| // handy wrapper method to avoid having to cast the filter to a DemoJuceFilter | // handy wrapper method to avoid having to cast the filter to a DemoJuceFilter | ||||
| // every time we need it.. | // every time we need it.. | ||||
| DemoJuceFilter* getFilter() const throw() { return (DemoJuceFilter*) getOwnerFilter(); } | |||||
| DemoJuceFilter* getFilter() const throw() { return (DemoJuceFilter*) getAudioProcessor(); } | |||||
| }; | }; | ||||
| @@ -38,18 +38,18 @@ BEGIN_JUCE_NAMESPACE | |||||
| //============================================================================== | //============================================================================== | ||||
| AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* const ownerFilter_) | |||||
| : ownerFilter (ownerFilter_) | |||||
| AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* const owner_) | |||||
| : owner (owner_) | |||||
| { | { | ||||
| // the filter must be valid.. | // the filter must be valid.. | ||||
| jassert (ownerFilter != 0); | |||||
| jassert (owner != 0); | |||||
| } | } | ||||
| AudioProcessorEditor::~AudioProcessorEditor() | AudioProcessorEditor::~AudioProcessorEditor() | ||||
| { | { | ||||
| // if this fails, then the wrapper hasn't called editorBeingDeleted() on the | // if this fails, then the wrapper hasn't called editorBeingDeleted() on the | ||||
| // filter for some reason.. | // filter for some reason.. | ||||
| jassert (ownerFilter->getActiveEditor() != this); | |||||
| jassert (owner->getActiveEditor() != this); | |||||
| } | } | ||||
| @@ -50,8 +50,6 @@ class AudioProcessorEditor : public Component | |||||
| protected: | protected: | ||||
| //============================================================================== | //============================================================================== | ||||
| /** Creates an editor for the specified processor. | /** Creates an editor for the specified processor. | ||||
| You'll need to pass in the filter that's creating it. | |||||
| */ | */ | ||||
| AudioProcessorEditor (AudioProcessor* const owner); | AudioProcessorEditor (AudioProcessor* const owner); | ||||
| @@ -61,13 +59,13 @@ public: | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Returns a pointer to the filter that owns this editor. */ | |||||
| AudioProcessor* getOwnerFilter() const throw() { return ownerFilter; } | |||||
| /** Returns a pointer to the processor that this editor represents. */ | |||||
| AudioProcessor* getAudioProcessor() const throw() { return owner; } | |||||
| private: | private: | ||||
| //============================================================================== | //============================================================================== | ||||
| AudioProcessor* const ownerFilter; | |||||
| AudioProcessor* const owner; | |||||
| }; | }; | ||||