[gnome-documents: 6/10] preview: set private data before calling parent constructor



commit c8c56d36b2fa47093d5ec01cb09a59156bee89e4
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Dec 10 16:55:54 2012 -0500

    preview: set private data before calling parent constructor
    
    The parent constructor may call into methods that need this._previewView
    or this._lastText to be set already.

 src/preview.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/preview.js b/src/preview.js
index eaa8860..ffe817a 100644
--- a/src/preview.js
+++ b/src/preview.js
@@ -443,10 +443,10 @@ const PreviewSearchbar = new Lang.Class({
     Extends: Searchbar.Searchbar,
 
     _init: function(previewView) {
-        this.parent();
-
-        this._lastText = '';
         this._previewView = previewView;
+        this._lastText = '';
+
+        this.parent();
     },
 
     createSearchWidgets: function() {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]