-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
In order to allow for UI self-rebuild and automatic update within DomkitML declaration, we will introduce new metadata:
<flow class="icons" if( @rebuild isMine() )>
for( i in @rebuild getIcons() )
<icon(i) value={@bind i.progress}/>
</flow>
Gets translated to:
<flow class="icons" if( registerCheckRebuild(()->isMine()) )>
for( i in registerCheckRebuild(() -> getIcons()) ) {
<icon(i) id="__tmp"/>
registerBind(() __tmp.value = i.progress);
}
</flow>
registerCheckRebuild can then be implemented on the framework base class to perform regular checks and rebuild the UI if data has changed, and registerBind for updating values regularly.
We also need something like:
@rebuild var p = getStruct();
for( i in @rebuild p.icons ) {
}
That translates to:
var p;
registerCheckRebuild(() -> { p = getStruct(); true; });
for( i in registerCheckRebuild(() -> p.icons) ) {
}
So some vars can be updated before following rebuilds take place.
Metadata
Metadata
Assignees
Labels
No labels