2
0
Эх сурвалжийг харах

alternate fix for monaco issue

Nicolas Cannasse 1 жил өмнө
parent
commit
81a92e83b8
4 өөрчлөгдсөн 6 нэмэгдсэн , 13 устгасан
  1. 4 0
      bin/app.html
  2. 0 1
      common.hxml
  3. 2 3
      hide/Plugin.hx
  4. 0 9
      hide/tools/Macros.hx

+ 4 - 0
bin/app.html

@@ -102,6 +102,10 @@
 	</menu>
 </xml>
 <script src="hide.js"></script>
+<script>
+	// fix for monaco
+	$hxClasses["Reflect"].construct = global.Reflect.construct;
+</script>
 
 
 <script>

+ 0 - 1
common.hxml

@@ -13,4 +13,3 @@
 -D no-deprecation-warnings
 -D manual_sync_pad
 -cp libs
---macro hide.tools.Macros.initHide()

+ 2 - 3
hide/Plugin.hx

@@ -50,7 +50,7 @@ class Plugin {
 		"Type",
 		"ValueType",
 		"Xml",
-		"_Xml",		
+		"_Xml",
 	];
 
 	static function getLibraryPath( libName ) {
@@ -93,10 +93,9 @@ class Plugin {
 				C.addClassPath(hidePath+"/"+value);
 			default:
 			}
-		}		
+		}
 		for( e in EXCLUDES )
 			C.exclude(e);
-		hide.tools.Macros.initHide();
 	}
 	#end
 

+ 0 - 9
hide/tools/Macros.hx

@@ -16,15 +16,6 @@ class Macros {
 
 	#if macro
 
-	public static function initHide() {
-		switch( Context.getType("Reflect") ) {
-		case TInst(c,_):
-			// avoid conflict with monaco class
-			c.get().meta.add(":native",[macro "_Reflect"], (macro null).pos);
-		default:
-		}
-	}
-
 	static function includeShaderSources() {
 		var paths = [
 			"h3d/shader/BaseMesh.hx",