Skip to content
Browse files

Fix embedHTML call made before pack() in Builder

remove trace in Page
  • Loading branch information...
1 parent acabf7b commit 2f66cd5cb4700a37eb377938ace621124cb49216 @zabojad committed Oct 5, 2012
Showing with 13 additions and 14 deletions.
  1. +1 −1 src/brix/component/navigation/Page.hx
  2. +12 −13 src/brix/core/Builder.hx
View
2 src/brix/component/navigation/Page.hx
@@ -264,7 +264,7 @@ class Page extends DisplayObject, implements IGroupable
* Remove the children from the DOM
*/
public function close(transitionData:TransitionData = null, preventCloseByClassName:Null<Array<String>> = null, preventTransitions:Bool = false)
- {trace("close "+transitionData+", "+name+" - "+preventTransitions+" - "+groupElement);
+ {//trace("close "+transitionData+", "+name+" - "+preventTransitions+" - "+groupElement);
// default value
if (preventCloseByClassName==null)
preventCloseByClassName = new Array();
View
25 src/brix/core/Builder.hx
@@ -169,27 +169,27 @@ class Builder
//TODO debug error catching: why some errors in component are catch and other not ?
//parse the Application class fields to find the methods to fill in
discoverApplicationContextMethods(fields);
-
+
var pos = Context.currentPos();
-
+
//set the metaParameters var
//for ( metaName in { iterator : metaParameters.keys } )
//{
//initMetaParametersExprs.push( { expr : ECall( { expr : EField( { expr : EConst(CIdent( "metaParameters" )), pos : pos }, "set"), pos : pos }, [ { expr : EConst(CString( metaName )), pos : pos }, { expr : EConst(CString( metaParameters.get(metaName) )), pos : pos } ]), pos : pos } );
//}
-
+
//add the import and init() calls for the declared components in the application
includeComponents();
-
+
//check the components restrictions (needs to be done after includeComponents() 'cause it wouldn't resolve the component classes otherwise)
checkComponents();
//runMacroApplication(); // temporarly commented because of http://code.google.com/p/haxe/issues/detail?id=924 but will replace checkComponents() eventually.
-
- //embeds the html (body) within the application
- embedHTML(fields);
-
+
//finalize the application compilation
pack();
+
+ //embeds the html (body) within the application
+ embedHTML(fields);
//}
//catch (unknown : Dynamic)
//{
@@ -555,21 +555,20 @@ class Builder
{
return;
}
-
var pos = Context.currentPos();
//add the _htmlDocumentElement static var to ApplicationContext
var documentInnerHtml = haxe.Serializer.run("");
-
+
if (cocktail.Lib.document.documentElement.innerHTML != null)
{
documentInnerHtml = haxe.Serializer.run(cocktail.Lib.document.documentElement.innerHTML);
}
-
+
var htmlDocumentElementFieldValue = { expr : ECall({ expr : EField({ expr : EType({ expr : EConst(CIdent("haxe")), pos : pos }, "Unserializer"), pos : pos }, "run"), pos : pos },[{ expr : EConst(CString(documentInnerHtml)), pos : pos }]), pos : pos };
-
+
fields.push( { name : "htmlDocumentElement", doc : null, meta : [], access : [APublic, AStatic], kind : FVar(null, htmlDocumentElementFieldValue), pos : pos } );
-
+
#if brixdebug
neko.Lib.println("documentInnerHtml extracted and set on ApplicationContext with a size of "+documentInnerHtml.length);
#end

0 comments on commit 2f66cd5

Please sign in to comment.
Something went wrong with that request. Please try again.