From 8923e971e3e0697459ed5d2640ac68197168ba4e Mon Sep 17 00:00:00 2001 From: Olesya Bauer Date: Sat, 30 Jul 2022 14:04:21 +0200 Subject: [PATCH 1/2] Property stepping changed from process to stepping --- .../instance/deleteMorph..st | 23 ------------------- .../methodProperties.json | 1 - .../instance/initialize.st | 6 +---- .../instance/process..st | 3 --- .../instance/process.st | 3 --- .../instance/shouldGetStepsFrom..st | 4 ++++ .../instance/startStepping.st | 10 ++++++++ .../instance/step.st | 4 ++++ .../instance/stepTime.st | 4 ++++ .../instance/stopStepping.st | 5 ++++ .../methodProperties.json | 9 +++++--- .../instance/setUp.st | 2 +- .../methodProperties.json | 2 +- 13 files changed, 36 insertions(+), 40 deletions(-) delete mode 100644 packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/deleteMorph..st delete mode 100644 packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/process..st delete mode 100644 packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/process.st create mode 100644 packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/shouldGetStepsFrom..st create mode 100644 packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/startStepping.st create mode 100644 packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/step.st create mode 100644 packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/stepTime.st create mode 100644 packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/stopStepping.st diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/deleteMorph..st b/packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/deleteMorph..st deleted file mode 100644 index b1299d5..0000000 --- a/packages/AnimationsEditor-Core.package/AnimationsEditor.class/instance/deleteMorph..st +++ /dev/null @@ -1,23 +0,0 @@ -eventHandling -deleteMorph: aProcess - - - self selectedTreeNode ifNil: [^ 'break']. - - self propertyList copy do: [:each | - Transcript show: self propertyList first ; cr. - (self selectedTreeNode targetMorph = each targetMorph or: (self selectedTreeNode targetMorph hasSubmorphs ifTrue: [self selectedTreeNode targetMorph submorphs first = each targetMorph] ifFalse: [false])) - - ifTrue: [self selectedTreeNode targetMorph removeFlexShell. self propertyList remove: each. each targetMorph abandon. ].]. - - - self propertyTreeMorph update: self propertyTreeMorph getChildrenSelector. - - self propertyEditorPanel submorphs do: [:each| each abandon]. - self timeline submorphs do: [:each| each abandon]. - - aProcess terminate. - - - - \ No newline at end of file diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditor.class/methodProperties.json b/packages/AnimationsEditor-Core.package/AnimationsEditor.class/methodProperties.json index 97a7143..6d1eb70 100644 --- a/packages/AnimationsEditor-Core.package/AnimationsEditor.class/methodProperties.json +++ b/packages/AnimationsEditor-Core.package/AnimationsEditor.class/methodProperties.json @@ -38,7 +38,6 @@ "defaultEmptyPanels" : "DM 8/7/2020 17:37", "defaultPropertyPanelPosition" : "mjs 7/31/2021 16:18", "deleteMorph" : "NR 7/16/2022 17:09", - "deleteMorph:" : "NR 7/18/2022 18:35", "editorTitle" : "LH 8/4/2020 10:31", "editorTitle:" : "DM 8/3/2020 15:40", "emptyPanels" : "DM 8/7/2020 17:37", diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/initialize.st b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/initialize.st index 9116d6a..78b7bf5 100644 --- a/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/initialize.st +++ b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/initialize.st @@ -5,8 +5,4 @@ initialize super initialize. self isActivated: false. self addStartFrame. - self process: [ - [ 1 seconds asDelay wait. - self targetMorph isInWorld ifFalse: [self animationsEditor deleteMorph: self process.]. - ] repeat. - ] fork. \ No newline at end of file + self startStepping. \ No newline at end of file diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/process..st b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/process..st deleted file mode 100644 index e7ef6c5..0000000 --- a/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/process..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -process: anObject - process := anObject \ No newline at end of file diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/process.st b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/process.st deleted file mode 100644 index 3131313..0000000 --- a/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/process.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -process - ^ process \ No newline at end of file diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/shouldGetStepsFrom..st b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/shouldGetStepsFrom..st new file mode 100644 index 0000000..e1bac9e --- /dev/null +++ b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/shouldGetStepsFrom..st @@ -0,0 +1,4 @@ +stepping +shouldGetStepsFrom: aPasteUpMorph + + ^ true \ No newline at end of file diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/startStepping.st b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/startStepping.st new file mode 100644 index 0000000..e9f1928 --- /dev/null +++ b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/startStepping.st @@ -0,0 +1,10 @@ +stepping +startStepping + + self currentWorld + startStepping: self + at: Time millisecondClockValue + selector: #step + arguments: nil + stepTime: self stepTime. + self changed: #stepping. \ No newline at end of file diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/step.st b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/step.st new file mode 100644 index 0000000..39f7c29 --- /dev/null +++ b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/step.st @@ -0,0 +1,4 @@ +stepping +step + + self targetMorph isInWorld ifFalse: [self animationsEditor deleteMorph. self stopStepping]. diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/stepTime.st b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/stepTime.st new file mode 100644 index 0000000..17c5ae5 --- /dev/null +++ b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/stepTime.st @@ -0,0 +1,4 @@ +stepping +stepTime + + ^ 200. \ No newline at end of file diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/stopStepping.st b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/stopStepping.st new file mode 100644 index 0000000..564a4a4 --- /dev/null +++ b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/instance/stopStepping.st @@ -0,0 +1,5 @@ +stepping +stopStepping + + self currentWorld stopStepping: self. + self changed: #stepping. \ No newline at end of file diff --git a/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/methodProperties.json b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/methodProperties.json index fdae090..284c745 100644 --- a/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/methodProperties.json +++ b/packages/AnimationsEditor-Core.package/AnimationsEditorPropertyAnimated.class/methodProperties.json @@ -27,7 +27,7 @@ "executeCompositeAnimation:" : "FH 8/1/2021 19:11", "frame" : "MH 7/8/2021 11:08", "frame:" : "MH 7/8/2021 11:10", - "initialize" : "NR 7/18/2022 18:30", + "initialize" : "ob 7/30/2022 13:41", "isActivated" : "ob 6/26/2022 18:59", "isActivated:" : "ob 6/26/2022 18:59", "isFirstFrame" : "MH 7/8/2021 11:31", @@ -36,11 +36,14 @@ "messageKeyframeOutOfBounds" : "MH 7/8/2021 11:36", "messageNotEnoughKeyframes" : "CL 7/29/2021 12:05", "playAnimationWithStartEnd:" : "FH 8/1/2021 19:12", - "process" : "ob 7/12/2022 22:34", - "process:" : "ob 7/12/2022 22:34", "resetTargetMorph" : "LW 7/9/2021 15:34", "setAnimationProperty:" : "MH 7/8/2021 11:03", "setStartValue" : "MH 7/8/2021 11:31", + "shouldGetStepsFrom:" : "ob 7/30/2022 13:26", + "startStepping" : "ob 7/30/2022 14:01", + "step" : "ob 7/30/2022 13:51", + "stepTime" : "ob 7/30/2022 13:53", + "stopStepping" : "ob 7/30/2022 13:40", "targetDuration" : "MH 7/8/2021 11:10", "targetDuration:" : "MH 7/8/2021 11:11", "targetFrame" : "MH 7/8/2021 11:11", diff --git a/packages/AnimationsEditor-Tests.package/AnimationsEditorPropertyAnimatedTest.class/instance/setUp.st b/packages/AnimationsEditor-Tests.package/AnimationsEditorPropertyAnimatedTest.class/instance/setUp.st index 7c241e6..8be7efa 100644 --- a/packages/AnimationsEditor-Tests.package/AnimationsEditorPropertyAnimatedTest.class/instance/setUp.st +++ b/packages/AnimationsEditor-Tests.package/AnimationsEditorPropertyAnimatedTest.class/instance/setUp.st @@ -3,4 +3,4 @@ setUp super setUp. self morph: self morphClass new openInWorld. self property: (self propertyClass on: self morph). - self property process terminate. \ No newline at end of file + self property stopStepping. \ No newline at end of file diff --git a/packages/AnimationsEditor-Tests.package/AnimationsEditorPropertyAnimatedTest.class/methodProperties.json b/packages/AnimationsEditor-Tests.package/AnimationsEditorPropertyAnimatedTest.class/methodProperties.json index f7137cd..816b95b 100644 --- a/packages/AnimationsEditor-Tests.package/AnimationsEditorPropertyAnimatedTest.class/methodProperties.json +++ b/packages/AnimationsEditor-Tests.package/AnimationsEditorPropertyAnimatedTest.class/methodProperties.json @@ -9,5 +9,5 @@ "property" : "MH 8/1/2021 18:28", "property:" : "MH 8/1/2021 18:28", "propertyClass" : "CL 7/29/2021 11:42", - "setUp" : "NR 7/18/2022 18:33", + "setUp" : "ob 7/30/2022 13:59", "tearDown" : "LW 7/27/2021 11:53" } } From 3b5ab1ae4d36b34526952a426deee62b3445599a Mon Sep 17 00:00:00 2001 From: NinaR Date: Sat, 30 Jul 2022 16:25:53 +0200 Subject: [PATCH 2/2] Test Morph Closed In World deletes Morph in Editor. --- .../instance/morphIsDeleted.st | 4 ++++ .../instance/tearDown.st | 3 ++- .../testMorphClosedInWorldTreeSpecUpdated.st | 20 +++++++++++++++++++ .../methodProperties.json | 6 ++++-- 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/instance/morphIsDeleted.st create mode 100644 packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/instance/testMorphClosedInWorldTreeSpecUpdated.st diff --git a/packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/instance/morphIsDeleted.st b/packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/instance/morphIsDeleted.st new file mode 100644 index 0000000..9406215 --- /dev/null +++ b/packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/instance/morphIsDeleted.st @@ -0,0 +1,4 @@ +support +morphIsDeleted +"replace with self animationsEditorInstance selectedTreeNoe isNil" + ^self animationsEditorInstance propertyTreeMorph submorphs first submorphs size = 1. \ No newline at end of file diff --git a/packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/instance/tearDown.st b/packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/instance/tearDown.st index 2a89970..c31699f 100644 --- a/packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/instance/tearDown.st +++ b/packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/instance/tearDown.st @@ -3,10 +3,11 @@ tearDown | targetMorph | super tearDown. + self animationsEditorInstance propertyList first ifNotNil: [ targetMorph := (self animationsEditorInstance propertyList first) targetMorph. targetMorph isFlexed ifTrue: [targetMorph owner abandon]. "removes FlexShell" - targetMorph abandon. + targetMorph abandon. ]. self animationsEditorInstance windowReference abandon. \ No newline at end of file diff --git a/packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/instance/testMorphClosedInWorldTreeSpecUpdated.st b/packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/instance/testMorphClosedInWorldTreeSpecUpdated.st new file mode 100644 index 0000000..7e04ff9 --- /dev/null +++ b/packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/instance/testMorphClosedInWorldTreeSpecUpdated.st @@ -0,0 +1,20 @@ +testing +testMorphClosedInWorldTreeSpecUpdated + |morph goalReached monitor producer finished| + morph:= Morph new. + morph openInWorld. + + self animationsEditorInstance selectedTreeNode: (self animationsEditorInstance addTargetMorph: morph). + morph isFlexed + ifTrue: [morph owner abandon]. "removes FlexShell" + + goalReached := false. + finished := Semaphore new. + monitor := Monitor new. + producer := [ + [monitor critical: + [monitor waitUntil: [self morphIsDeleted]. + monitor signal]] + whileFalse. + finished signal. + self assert: self animationsEditorInstance propertyTreeMorph submorphs first submorphs size = 1.]. \ No newline at end of file diff --git a/packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/methodProperties.json b/packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/methodProperties.json index 2ef222b..735adea 100644 --- a/packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/methodProperties.json +++ b/packages/AnimationsEditor-Tests.package/AnimationsEditorTest.class/methodProperties.json @@ -4,10 +4,12 @@ "instance" : { "animationsEditorInstance" : "MH 8/1/2021 18:39", "animationsEditorInstance:" : "MH 8/1/2021 18:39", - "setUp" : "LW 6/27/2021 13:26", - "tearDown" : "Noel Bastubbe 6/22/2022 11:55", + "morphIsDeleted" : "NR 7/30/2022 16:23", + "setUp" : "NR 7/30/2022 15:15", + "tearDown" : "NR 7/30/2022 15:15", "testGetDeepestMorph" : "MH 8/1/2021 18:40", "testInstanceCreation" : "LW 6/27/2021 13:30", + "testMorphClosedInWorldTreeSpecUpdated" : "NR 7/30/2022 16:24", "testPlayAnimations" : "Noel Bastubbe 6/22/2022 11:52", "testSelectMorphByHand" : "MH 8/1/2021 18:40", "testShowMessagePlayAnimation" : "Noel Bastubbe 6/22/2022 11:56",