Skip to content

Commit

Permalink
Simplifies the WorldExample implementation by making use of the examp…
Browse files Browse the repository at this point in the history
…le execution states. In the course of this repairs some inconsistencies with the suspend/resume buttons in example morphs.
  • Loading branch information
codeZeilen committed Jan 13, 2023
1 parent c72ca9c commit 8f84d3a
Show file tree
Hide file tree
Showing 23 changed files with 47 additions and 59 deletions.
Empty file.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tracing
resumeTracing

self startTracing.


Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tracing
suspendTracingProcess

self stopTracing.


Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
tracingIsStillRunning

^ true
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tracing
tracingProcessIsSuspended

^ self isTracing not

Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@
"bpExamplePragmaPrefix" : "pre 9/6/2022 11:14" },
"instance" : {
"asPragma" : "pre 9/6/2022 11:14",
"ensureTerminatedProcess" : "pre 1/13/2023 16:28",
"exampleName" : "pre 9/5/2022 14:52",
"initialize" : "pre 9/6/2022 10:14",
"initializeFromPragma:" : "pre 9/6/2022 10:29",
"isTracing" : "pre 9/6/2022 09:10",
"morphClass" : "pre 9/5/2022 14:52",
"resumeTracing" : "pre 1/13/2023 16:32",
"runOn:" : "pre 1/13/2023 16:28",
"startTracing" : "pre 9/6/2022 09:09",
"stopTracing" : "pre 9/6/2022 09:10",
"suspendTracingProcess" : "pre 1/13/2023 16:32",
"trace" : "pre 1/13/2023 16:29",
"traceInBackground" : "pre 1/13/2023 16:29",
"tracingIsStillRunning" : "pre 1/13/2023 16:36",
"tracingProcessIsSuspended" : "pre 1/13/2023 16:47",
"uniqueIdentifier" : "pre 9/5/2022 13:17",
"update:with:" : "pre 9/6/2022 10:16" } }
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"name" : "BPWorldExampleReference",
"pools" : [
],
"super" : "BPContinuousRunExample",
"super" : "BPExample",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ installUIProcessTracing
tracer := BPTracer forExample: self.
BPActiveTracer uiProcessTracer: tracer.
trace := tracer intermediateTrace.
trace hasTraceCompleted: false.
self changed: #worldExampleTrace with: trace.
Project current addDeferredUIMessage: [#bpInstrumented activateLayerInCurrentProcess].
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"clearTrace" : "pre 11/16/2022 16:26",
"exampleName" : "pre 9/5/2022 14:52",
"initialize" : "pre 9/6/2022 09:09",
"installUIProcessTracing" : "pre 9/6/2022 10:17",
"installUIProcessTracing" : "pre 1/13/2023 16:58",
"isTracing" : "pre 9/6/2022 09:10",
"morphClass" : "pre 9/5/2022 14:52",
"removeUIProcessTracing" : "pre 9/5/2022 13:35",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ private - ui
ensureLoaderIcon

| loaderIconHolder |
(loaderIconHolder := self submorphNamed: #loaderIconHolder) submorphs ifEmpty: [
loaderIconHolder := self submorphNamed: #loaderIconHolder.
(loaderIconHolder submorphNamed: #resumeTrace) ifNotNil: [self ensureNoLoaderIcon].
loaderIconHolder submorphs ifEmpty: [
loaderIconHolder addMorphBack:
((BPIcons loaderIcon scaledToSize: self iconSize) asMorph name: #loader)].
((BPIcons loaderIcon scaledToSize: self iconSize) asMorph
name: #loader;
on: #click send: #suspendTracingProcess to: self example)].
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ private - ui
ensureResumeTracingIcon

| loaderIconHolder |
(loaderIconHolder := self submorphNamed: #loaderIconHolder).
loaderIconHolder := self submorphNamed: #loaderIconHolder.
(loaderIconHolder submorphNamed: #loader) ifNotNil: [self ensureNoLoaderIcon].
loaderIconHolder submorphs ifEmpty: [loaderIconHolder addMorphBack:
((BPIcons playIcon scaledToSize: self iconSize) asMorph
balloonText: 'Example execution timed out with given delay. Click here to resume.';
on: #click send: #resumeTracing to: self example)]
loaderIconHolder submorphs ifEmpty: [
loaderIconHolder addMorphBack:
((BPIcons playIcon scaledToSize: self iconSize) asMorph
name: #resumeTrace;
balloonText: 'Example execution timed out with given delay. Click here to resume.';
on: #click send: #resumeTracing to: self example)]
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"containedMethod" : "jb 12/6/2021 18:23",
"debugMenuItemClicked" : "pre 7/20/2022 17:58",
"deleteAllAnnotationsClicked" : "lu 2/22/2022 01:32",
"ensureLoaderIcon" : "joabe 9/28/2022 22:37",
"ensureLoaderIcon" : "pre 1/13/2023 16:57",
"ensureNoLoaderIcon" : "jb 12/7/2020 18:58",
"ensureResumeTracingIcon" : "joabe 9/29/2022 00:32",
"ensureResumeTracingIcon" : "pre 1/13/2023 16:56",
"example" : "pre 9/30/2020 10:34",
"example:" : "jb 12/7/2020 18:58",
"expand" : "pre 7/19/2022 15:29",
Expand Down

0 comments on commit 8f84d3a

Please sign in to comment.