Skip to content

Commit 8de555b

Browse files
committedJan 2, 2020
Stop a module
1 parent 91a57e4 commit 8de555b

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed
 

‎js/easycoder/Core.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,6 +1856,7 @@ const EasyCoder_Core = {
18561856
if (command.name) {
18571857
const symbolRecord = program.getSymbolRecord(command.name);
18581858
EasyCoder.scripts[symbolRecord.program].exit();
1859+
symbolRecord.program = null;
18591860
} else {
18601861
return 0;
18611862
}

‎resources/ecs/codex.ecs

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
a Link
4242
a Index
4343
module TestModule
44+
module DocManModule
4445
callback DecoratorCallback
4546
variable Password
4647
variable PasswordRequested
@@ -270,44 +271,45 @@
270271
create HelpInner in HelpOuter
271272
set the style of HelpInner to `width:100%;line-height:1.5em`
272273

273-
create HelpPanel in HelpInner
274-
set the style of HelpPanel to `display:none;width:100%;height:100%`
275-
create ReferencePanel in HelpInner
276-
set the style of ReferencePanel to `display:none;width:100%;height:100%`
274+
create HelpPanel in HelpInner
275+
set the style of HelpPanel to `display:none;width:100%;height:100%`
276+
create ReferencePanel in HelpInner
277+
set the style of ReferencePanel to `display:none;width:100%;height:100%`
277278

278-
gosub to ShowHelpPage
279-
rest get Script from `/resources/ecs/docman.ecs`
280-
run Script with ReferencePanel
281-
put empty into storage as `.ref`
279+
gosub to ShowHelpPage
280+
rest get Script from `/resources/ecs/docman.ecs`
281+
run Script with ReferencePanel as DocManModule
282+
put empty into storage as `.ref`
282283

283-
get Item from storage as `.ref`
284+
get Item from storage as `.ref`
284285
if Item
285286
begin
286287
set style `display` of ReferencePanel to `block`
287288
set style `display` of HelpButtons to `none`
288289
end
289290
else set style `display` of HelpPanel to `block`
290291

291-
on click Back go to StepBack
292-
on click Forward go to StepForward
292+
on click Back go to StepBack
293+
on click Forward go to StepForward
293294
on click Contents go to ShowContents
294-
on click Reference
295+
on click Reference
295296
begin
296297
set style `display` of ReferencePanel to `block`
297298
set style `display` of HelpPanel to `none`
298299
set style `display` of HelpButtons to `none`
299300
put `y` into storage as `.ref`
300301
end
301-
on click Tools
302+
on click Tools
302303
begin
303304
put `tools` into Step
304305
gosub to ShowHelpPage
305306
end
306-
on click Exit
307+
on click Exit
307308
begin
309+
stop DocManModule
308310
remove element Body
309-
send `restore` to parent
310-
exit
311+
send `restore` to parent
312+
exit
311313
end
312314

313315
on message

0 commit comments

Comments
 (0)
Please sign in to comment.