diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index fd4f924119..804cae8b52 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -54,8 +54,14 @@ class CompileTab { this._deps.config, this.queryParams ) + } + activate () { this.listenToEvents() + this.compilerContainer.activate() + } + + deactivate () { } /************ diff --git a/src/app/tabs/compileTab/compilerContainer.js b/src/app/tabs/compileTab/compilerContainer.js index 358b94abb3..805f9d429f 100644 --- a/src/app/tabs/compileTab/compilerContainer.js +++ b/src/app/tabs/compileTab/compilerContainer.js @@ -25,8 +25,6 @@ class CompilerContainer { defaultVersion: 'soljson-v0.5.1+commit.c8a2cb62.js', // this default version is defined: in makeMockCompiler (for browser test) and in package.json (downloadsolc_root) for the builtin compiler baseurl: 'https://solc-bin.ethereum.org/bin' } - - this.listenToEvents() } /** @@ -38,6 +36,13 @@ class CompilerContainer { yo.update(this._view.compilationButton, button) } + deactivate () { + } + + activate () { + this.listenToEvents() + } + listenToEvents () { this.editor.event.register('contentChanged', this.scheduleCompilation.bind(this)) this.editor.event.register('sessionSwitched', this.scheduleCompilation.bind(this))