Add rider

This commit is contained in:
2026-05-18 13:31:59 +09:00
parent 1cab4f5218
commit 9b2fe74e83
3 changed files with 80 additions and 41 deletions
+24 -19
View File
@@ -54,23 +54,24 @@
-record(s,
{wx = none :: none | wx:wx_object(),
frame = none :: none | wx:wx_object(),
lang = en :: en | jp,
j = none :: none | fun(),
prefs = #{} :: map(),
keys = #w{} :: #w{},
accs = [] :: [#wr{}],
check = #w{} :: #w{},
list = #w{} :: #w{},
dl = #w{} :: #w{},
dest = none :: none | wx:wx_object(),
ttl = none :: none | wx:wx_object(),
path = none :: none | wx:wx_object(),
sign = none :: none | wx:wx_object(),
size = none :: none | wx:wx_object(),
cost = none :: none | wx:wx_object(),
ul = none :: none | wx:wx_object()}).
{wx = none :: none | wx:wx_object(),
frame = none :: none | wx:wx_object(),
lang = en :: en | jp,
j = none :: none | fun(),
prefs = #{} :: map(),
keys = #w{} :: #w{},
accs = [] :: [#wr{}],
rider = none :: none | pid(),
check = #w{} :: #w{},
list = #w{} :: #w{},
dl = #w{} :: #w{},
dest = none :: none | wx:wx_object(),
ttl = none :: none | wx:wx_object(),
path = none :: none | wx:wx_object(),
sign = none :: none | wx:wx_object(),
size = none :: none | wx:wx_object(),
cost = none :: none | wx:wx_object(),
ul = none :: none | wx:wx_object()}).
%-record(mochila,
% {tar = <<>> :: binary(),
@@ -306,8 +307,12 @@ do_accounts(State, Manifest) ->
State.
do_check(State) ->
ok = tell(info, "Would do_check."),
do_check(State = #s{rider = none}) ->
PID = spawn_link(gd_n_rider, init, ["Something"]),
do_check(State#s{rider = PID});
do_check(State = #s{rider = PID}) ->
Stuff = gd_n_rider:stuff(PID),
ok = tell(info, "Rider has Stuff: ~tp", [Stuff]),
State.