Skip to content

Commit

Permalink
added argsNames for runtime viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Jan 23, 2024
1 parent f6b7930 commit f6bf528
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions domkit/Component.hx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class Component<BaseT,T> {
public var name : String;
public var make : Array<Dynamic> -> BaseT -> T;
public var parent : Component<BaseT,Dynamic>;
public var argsNames : Array<String>;
var propsHandler : Array<PropertyHandler<T,Dynamic>>;

public function new(name, make, parent) {
Expand Down
2 changes: 2 additions & 0 deletions domkit/MetaComponent.hx
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ class MetaComponent extends Component<Dynamic,Dynamic> {
setExprs.set(p.name, set);
handlers.push(expr);
}
if( cargs != null )
handlers.push(macro this.argsNames = $v{[for( i in 0...cargs.length-1 ) cargs[i].name]});

var parserClass = switch( parserType ) {
case TPath(t): t;
Expand Down

0 comments on commit f6bf528

Please sign in to comment.