-
-
Save bsideup/5834875 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A | |
{ | |
public var aString:String; | |
public var innerString : String; | |
public var anotherInnerString : String; | |
@hxmrDefaultProperty public var children : Array<B>; | |
public function new() | |
{ | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ml.Test extends A{ | |
public new(method) : Void -> Void | |
= function() = { | |
super(); | |
this.myString = "Hello again!"; | |
this.myB = this.init_myB(); | |
this.aString = "1"; | |
this.innerString = "Hello!"; | |
this.anotherInnerString = Std.string(this.myString); | |
this.children = this.init_children(); | |
}; | |
init_children(method) : Void -> Array<deep.B> | |
= function() = { | |
if ((this.children != null))return this.children); | |
this.children = new Array(); | |
return this.children; | |
}; | |
init_myB(method) : Void -> deep.B | |
= function() = { | |
if ((this.myB != null))return this.myB); | |
this.myB = new deep.B(); | |
return this.myB; | |
}; | |
public myB(var) : deep.B; | |
public myString(var) : String; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<ans:A ans:aString="1" xmlns:ans="*"> | |
<B id="myB" xmlns="deep.*" test="123" prop="asValue"/> | |
<ans:innerString>Hello!</ans:innerString> | |
<ans:anotherInnerString> | |
<String id="myString">Hello again!</String> | |
</ans:anotherInnerString> | |
</ans:A> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment