Browse Source

boot.js: Move wireKlass to ManipulationBrik.

Herbert Vojčík 8 years ago
parent
commit
0636bb1b4d
1 changed files with 10 additions and 8 deletions
  1. 10 8
      support/boot.js

+ 10 - 8
support/boot.js

@@ -250,6 +250,13 @@ define(['require', './brikz.umd', './compatibility'], function (require, Brikz)
     });
 
     function ManipulationBrik(brikz, st) {
+        function wireKlass(klass) {
+            Object.defineProperty(klass.fn.prototype, "klass", {
+                value: klass,
+                enumerable: false, configurable: true, writable: true
+            });
+        }
+
         function installJSMethod(obj, jsSelector, fn) {
             Object.defineProperty(obj, jsSelector, {
                 value: fn,
@@ -261,6 +268,7 @@ define(['require', './brikz.umd', './compatibility'], function (require, Brikz)
             installJSMethod(klass.fn.prototype, method.jsSelector, method.fn);
         }
 
+        this.wireKlass = wireKlass;
         this.installMethod = installMethod;
         this.installJSMethod = installJSMethod;
     }
@@ -314,10 +322,11 @@ define(['require', './brikz.umd', './compatibility'], function (require, Brikz)
         };
     });
 
-    var ClassesBrik = depends(["organize", "root", "smalltalkGlobals", "classInit"], function (brikz, st) {
+    var ClassesBrik = depends(["organize", "manipulation", "root", "smalltalkGlobals", "classInit"], function (brikz, st) {
         var setupClassOrganization = brikz.organize.setupClassOrganization;
         var addOrganizationElement = brikz.organize.addOrganizationElement;
         var removeOrganizationElement = brikz.organize.removeOrganizationElement;
+        var wireKlass = brikz.manipulation.wireKlass;
         var globals = brikz.smalltalkGlobals.globals;
         var initClass = brikz.classInit.initClass;
         var rootAsClass = brikz.root.rootAsClass;
@@ -398,13 +407,6 @@ define(['require', './brikz.umd', './compatibility'], function (require, Brikz)
             return that;
         }
 
-        function wireKlass(klass) {
-            Object.defineProperty(klass.fn.prototype, "klass", {
-                value: klass,
-                enumerable: false, configurable: true, writable: true
-            });
-        }
-
         function setupClass(klass, spec) {
             klass.iVarNames = spec.iVarNames || [];
             if (spec.pkg) {