Adapting in the new hz functions

This commit is contained in:
Craig Everett 2026-02-12 17:46:52 +09:00
parent 34a73a8e99
commit 3a570f000e

View File

@ -1227,7 +1227,8 @@ close_instance(State = #s{cons = {Consbook, Pages}, buttons = Buttons}) ->
State; State;
Index -> Index ->
{#c{funs = {_, IFaces}}, NewPages} = take_nth(Index + 1, Pages), {#c{funs = {_, IFaces}}, NewPages} = take_nth(Index + 1, Pages),
IDs = list_iface_buttons(IFaces), log(info, "IFaces: ~tp", [IFaces]),
IDs = list_iface_buttons(maps:values(IFaces)),
NewButtons = maps:without(IDs, Buttons), NewButtons = maps:without(IDs, Buttons),
true = wxNotebook:deletePage(Consbook, Index), true = wxNotebook:deletePage(Consbook, Index),
State#s{cons = {Consbook, NewPages}, buttons = NewButtons} State#s{cons = {Consbook, NewPages}, buttons = NewButtons}
@ -1248,7 +1249,7 @@ compile(Source) ->
case so_compiler:from_string(Source, Options) of case so_compiler:from_string(Source, Options) of
{ok, Build} -> {ok, Build} ->
ACI = maps:get(aci, Build), ACI = maps:get(aci, Build),
AACI = hz:prepare_aaci(ACI), AACI = hz_aaci:prepare(ACI),
Complete = maps:put(aaci, AACI, Build), Complete = maps:put(aaci, AACI, Build),
{ok, Complete}; {ok, Complete};
Other -> Other ->