Skip to content

Commit 6c463c0

Browse files
committed
Improvements to ReadMe.
1 parent ed4ee61 commit 6c463c0

File tree

2 files changed

+143
-5
lines changed

2 files changed

+143
-5
lines changed

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,25 @@ No swc as you should compile from source to ensure it extends the same version o
66

77
**Usage:**
88

9+
In your context:
10+
11+
override protected function mapInjections():void
12+
{
13+
super.mapInjections();
14+
injector.mapValue(ICompoundCommandMap, new CompoundCommandMap(eventDispatcher, injector, reflector));
15+
}
16+
17+
18+
Where you want to map commands to multiple events:
19+
920
// params: command, isOneShot, requireInOrder
1021
compoundCommandMap.mapToEvents(SomeAwesomeCommand, true, true)
1122
.addRequiredEvent(SomeEvent.SOMETHING_HAPPENED, SomeEvent);
1223
.addRequiredEvent(SomeOtherEvent.SOMETHING_ELSE_HAPPENED, SomeOtherEvent, 'somethingElseHappened');
1324
.addRequiredEvent(SomeOtherEvent.STUFF_HAPPENED, SomeOtherEvent, 'stuffHappened');
25+
1426

15-
// in the command itself
27+
In the command itself - named injection only required where you have multiple events of the same event class:
1628

1729
[Inject]
1830
public var someEvent:SomeEvent;
@@ -23,7 +35,7 @@ No swc as you should compile from source to ensure it extends the same version o
2335
[Inject(name='stuffHappened')]
2436
public var stuffHappenedEvent:SomeOtherEvent;
2537

26-
etc - but there's a common use case where you'd only be interested in the fact that all 3 signals have fired and wouldn't need the events at all, or would only need the last one.
38+
etc - but there's a common use case where you'd only be interested in the fact that all 3 events have fired and wouldn't need the events at all, or would only need the last one.
2739

2840
See tests/org/robotlegs/base/CompoundCommandMapTest for full usage examples.
2941

compoundCommandMap.tmproj

Lines changed: 129 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>currentDocument</key>
6+
<string>README.md</string>
57
<key>documents</key>
68
<array>
79
<dict>
@@ -16,12 +18,136 @@
1618
</dict>
1719
</array>
1820
<key>fileHierarchyDrawerWidth</key>
19-
<integer>403</integer>
21+
<integer>332</integer>
2022
<key>metaData</key>
21-
<dict/>
23+
<dict>
24+
<key>README.md</key>
25+
<dict>
26+
<key>caret</key>
27+
<dict>
28+
<key>column</key>
29+
<integer>0</integer>
30+
<key>line</key>
31+
<integer>3</integer>
32+
</dict>
33+
<key>firstVisibleColumn</key>
34+
<integer>0</integer>
35+
<key>firstVisibleLine</key>
36+
<integer>0</integer>
37+
</dict>
38+
<key>rakefile.rb</key>
39+
<dict>
40+
<key>caret</key>
41+
<dict>
42+
<key>column</key>
43+
<integer>57</integer>
44+
<key>line</key>
45+
<integer>29</integer>
46+
</dict>
47+
<key>firstVisibleColumn</key>
48+
<integer>0</integer>
49+
<key>firstVisibleLine</key>
50+
<integer>0</integer>
51+
</dict>
52+
<key>src/org/robotlegs/base/CompoundCommandConfig.as</key>
53+
<dict>
54+
<key>caret</key>
55+
<dict>
56+
<key>column</key>
57+
<integer>3</integer>
58+
<key>line</key>
59+
<integer>98</integer>
60+
</dict>
61+
<key>firstVisibleColumn</key>
62+
<integer>0</integer>
63+
<key>firstVisibleLine</key>
64+
<integer>39</integer>
65+
</dict>
66+
<key>src/org/robotlegs/base/CompoundCommandMap.as</key>
67+
<dict>
68+
<key>caret</key>
69+
<dict>
70+
<key>column</key>
71+
<integer>39</integer>
72+
<key>line</key>
73+
<integer>56</integer>
74+
</dict>
75+
<key>firstVisibleColumn</key>
76+
<integer>0</integer>
77+
<key>firstVisibleLine</key>
78+
<integer>20</integer>
79+
</dict>
80+
<key>src/org/robotlegs/core/ICompoundCommandConfig.as</key>
81+
<dict>
82+
<key>caret</key>
83+
<dict>
84+
<key>column</key>
85+
<integer>22</integer>
86+
<key>line</key>
87+
<integer>16</integer>
88+
</dict>
89+
<key>firstVisibleColumn</key>
90+
<integer>0</integer>
91+
<key>firstVisibleLine</key>
92+
<integer>0</integer>
93+
</dict>
94+
<key>src/org/robotlegs/core/ICompoundCommandMap.as</key>
95+
<dict>
96+
<key>caret</key>
97+
<dict>
98+
<key>column</key>
99+
<integer>28</integer>
100+
<key>line</key>
101+
<integer>0</integer>
102+
</dict>
103+
<key>firstVisibleColumn</key>
104+
<integer>0</integer>
105+
<key>firstVisibleLine</key>
106+
<integer>0</integer>
107+
</dict>
108+
<key>src/org/robotlegs/mvcs/CompoundCommand.as</key>
109+
<dict>
110+
<key>caret</key>
111+
<dict>
112+
<key>column</key>
113+
<integer>0</integer>
114+
<key>line</key>
115+
<integer>10</integer>
116+
</dict>
117+
<key>firstVisibleColumn</key>
118+
<integer>0</integer>
119+
<key>firstVisibleLine</key>
120+
<integer>0</integer>
121+
</dict>
122+
<key>test/org/robotlegs/base/CompoundCommandMapTest.as</key>
123+
<dict>
124+
<key>caret</key>
125+
<dict>
126+
<key>column</key>
127+
<integer>13</integer>
128+
<key>line</key>
129+
<integer>188</integer>
130+
</dict>
131+
<key>firstVisibleColumn</key>
132+
<integer>0</integer>
133+
<key>firstVisibleLine</key>
134+
<integer>168</integer>
135+
</dict>
136+
</dict>
137+
<key>openDocuments</key>
138+
<array>
139+
<string>src/org/robotlegs/base/CompoundCommandConfig.as</string>
140+
<string>src/org/robotlegs/base/CompoundCommandMap.as</string>
141+
<string>src/org/robotlegs/mvcs/CompoundCommand.as</string>
142+
<string>rakefile.rb</string>
143+
<string>README.md</string>
144+
<string>src/org/robotlegs/core/ICompoundCommandMap.as</string>
145+
<string>src/org/robotlegs/core/ICompoundCommandConfig.as</string>
146+
<string>test/org/robotlegs/base/CompoundCommandMapTest.as</string>
147+
</array>
22148
<key>showFileHierarchyDrawer</key>
23149
<true/>
24150
<key>windowFrame</key>
25-
<string>{{61, 4}, {875, 874}}</string>
151+
<string>{{5, 4}, {1071, 874}}</string>
26152
</dict>
27153
</plist>

0 commit comments

Comments
 (0)