2
A command to record a mathItem construction
5
#name : #DrGMathItemCommand,
6
#superclass : #DrGCommand,
10
#category : #'DrGeoII-Core-Command'
13
{ #category : #'as yet unclassified' }
14
DrGMathItemCommand class >> for: aMathItem in: aDomain [
17
fromMathItem: aMathItem .
20
{ #category : #'as yet unclassified' }
21
DrGMathItemCommand class >> with: aBuilder in: aDomain [
24
createMathItem: aBuilder.
27
{ #category : #accessing }
28
DrGMathItemCommand >> createMathItem: aBuilder [
29
mathItems := aBuilder getItem.
33
{ #category : #command }
34
DrGMathItemCommand >> execute [
35
"Remove any previous dependant"
36
mathItems do: [:aMathItem|
37
"record the mathItem in the factory"
38
domain factory add: aMathItem.
39
domain triggerEvent: #redoMathItem with: aMathItem].
43
{ #category : #accessing }
44
DrGMathItemCommand >> fromMathItem: aMathItem [
45
mathItems := {aMathItem}.
49
{ #category : #'dependents access' }
50
DrGMathItemCommand >> release [
52
mathItems do: [:m | m release]
55
{ #category : #command }
56
DrGMathItemCommand >> unexecute [
57
"remove the mathItem in the factory"
58
domain factory remove: mathItems