-
Notifications
You must be signed in to change notification settings - Fork 78
/
Copy pathVERSION
116 lines (104 loc) · 7.5 KB
/
VERSION
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
PureMVC AS3 Standard Framework
--------------------------------------------------------------------------
Release Date: 08/14/08
Platform: ActionScript 3 (Flash, Flex, AIR)
Version: 2
Revision: 0
Minor: 4
Author: Cliff Hall <cliff@puremvc.org>
--------------------------------------------------------------------------
2.0.4 Dissallowed re-registration of Mediators in View.registerMediator.
For more on this bug, see:
http://forums.puremvc.org/index.php?topic=372
Modified View.notifyObservers to notify from a copy of the
observer list rather than the actual observer list, which may
change during the notification loop. For more on this bug, see:
http://forums.puremvc.org/index.php?topic=490
2.0.3 Added notifyObservers back to IFacade, where it is required
if you are sending custom Notifications. No unit tests required.
2.0.2 Refactored View.removeMediator method, moving the logic for removing
an observer into a removeObserver method (also on IView), which is now
called by the Controller.removeCommand method as well as the
View.removeMediator method. This fixes the issue described here:
http://forums.puremvc.org/index.php?topic=308.0
Also, the Proxy.removeProxy method only attempts to remove the Proxy
if it is registered.
2.0.1 This is the public release, due to the limited release of 2.0 which
did not contain onRegister and onRemove for Proxy and IProxy. Also
Model, View and Controller classes have been moved together in the
core package. This has impact to you only if you are extending or
importing Model, View or Controller directly. Since access to
these actors is generally through the Facade, this should not be
an issue.
2.0 This release breaks backward compatibility with any previous release
because the package structure has changed to incorporate the language
for this release. Also, the Mediator naming scheme changed to match
that of the Proxy. Now the constructor to the Mediator takes a
mediatorName argument before the viewComponent argument. This means
that you no longer need to override the getMediatorName method in
your Mediators, you merely send the name to super to be set in the
constructor.The Mediator also gets a setViewComponent method so that
transient view components are supported. The Model, View and Facade
removeProxy and removeMediator methods now return a reference to the
Proxy or Mediator that was removed from the Model or the View. This
supports dynamic unregistration and reregistration of Proxies and
Mediators. And the Facade now implements INotifier, adding a
sendNotification method. This method makes use of the facade's
notifyObservers method, and so Notifier's sendNotification method now
calls facade.sendNotification. This means that you never have
to create a notification inside the facade and call notifyObservers,
you may simply call sendNotification with the parameters in the same
way that Commands, Mediators and Proxies do. It is left public in the
facade only so that you may still create and send custom notification
classes. Model and Facade get hasProxy method; View and Facade get a
hasMediator method to. Mediator and Proxy get onRegister and onRemove
methods. Notification.toString method was fixed.
1.7.1 A unneeded break statement was in the view's removeMediator method after the
refactor for 1.7. This bug was not flushed out because of a flaw in the test
which has been corrected. Here is the associated forum post:
http://forums.puremvc.org/index.php?topic=181.msg579#msg579
1.7 The Controller's registerCommand method was modified to only create the corresponding
Observer for the ICommand being registered if no previous ICommand was registered
to the Notification name in question. The behavior of the method is the same in that
if an ICommand was previously registered for the Notification, it is no longer used
and the newly registered ICommand is. However, the previous implementation created
and registered an extra Observer, which could lead to the new ICommand being executed
twice. Added removeCommand method to the Facade, which is passed through to the
Controller. Being such a little-used method its omission was intentional, but it is
included now as a matter of form. Added to the removeCommand to the IFacade interface
as well. An issue with the View's removeMediator method was fixed. The previous
implementation iterated through the observer list, removing associated Observers,
however this caused the length of the Observer list to change, leading to the
possibility that some Observers would not be removed when they should have been. The
issue is discussed here: http://forums.puremvc.org/index.php?topic=145.msg478#msg478
1.6 The 1.5 removeMediator implementation created a new situation where after an
observerMap array was nulled due to its length falling to zero. subsequent calls
to removeMediator could throw an exception. This was because the method of removing
the only reference to the array was setting the observerMap value to null for the
observerMap key in question. This method was used since Adobe's 'Programming
ActionScript 3.0 > Core ActionScript 3.0 Data Types and Classes > Working with
Arrays' says: "You may come across code that uses the delete operator on an array
element. The delete operator sets the value of an array element to undefined, but
it does not remove the element from the array". However, this proves to no longer
be the case. So now, the delete operator is used to remove both observerMap and
mediatorMap entries.
1.5 Amended removeMediator method to remove associated Observer references from
the observerMap. When a notificationName's observer list length falls to zero
the reference to the observer list is also removed. Added compareNotifyContext
method to the Observer class and IObserver interface, which compares a given
object to the Observer's notification context and returns a Boolean indicating
their equality. This allows the View to compare the Mediator being removed with
the Observer's notification context without breaking the Observer's encapsulation.
1.4 Added INotifier interface and Notifier class. MacroCommand, Command, Mediator
and Proxy all extend Notifier and implement INotifier. The sendNotification
method in Proxy and Mediator was moved to Notifier and is now available to
Commands. Also the protected facade property was moved from Proxy and Mediator
into Notifier, so Commands now get the facade reference at construction time.
1.3 Obviated the need for AbstractProxy and AbstractMediator in applications:
* Implemented sendNotification convenience method in Proxy and Mediator
* Added protected facade:Ifacade property initialized to Facade.getInstance()
on both Mediator and Proxy. The concrete Facade must be instantiated
first, but this call will return the concrete instance, even though the
framework Facade.getInstance is called.
1.2 - Removed old files that were inadvertently included.
1.1 - Repackaged zip and updated inline docs