PageRenderTime 17ms CodeModel.GetById 10ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

Unknown | 119 lines | 96 code | 23 blank | 0 comment | 0 complexity | eebeaf186eb79fa62fcd13d6ee9c509b MD5 | raw file
  1h2. AS3 Signals Changelog:
  3h3. v0.9 - NeufGun
  5h4. API Additions
  6* ISlot: listener registration object with many features.
  7** A slot stores values of *once* and *priority*, replacing the untyped "listener box" objects.
  8** A slot can *remove()* its listener from the signal.
  9** Has *enabled* toggle to temporarily disconnect the listener without removing it.
 10** The slot's *listener* can be changed on the fly.
 11** Has optional array of *params* which are appended to the signal's dispatched values before reaching the listener. Similar to delegates that store extra args.
 12* IOnceSignal: has *addOnce()* but not *add()*. Useful for completion signals that discard all listeners on dispatch. Idea by @alecmce.
 13* MonoSignal: can have only one listener. Useful for callbacks and SignalCommandMap request signals. Originally implemented as SingleSignal by @stickupkid.
 14* PrioritySignal: like DeluxeSignal without bubbling (thanks @neilmanuell).
 15* Native Signal Sets: 
 16** @jonopus developed an easy way to snap on NativeSignals to Sprite, Timer, etc. See *org.osflash.signals.natives.sets* package.
 17** Created SignalSprite, SignalTimer, etc. as example base classes. See *org.osflash.signals.natives.base* package.
 19h4. API Changes
 20* Removed ISignalOwner, INativeSignalOwner and IDispatcher. They became annoying, e.g. casting ISignal to Signal just to dispatch. Moved their methods into ISignal.
 21* *add()*, *addOnce()* and *remove()* now return ISlot.  
 23h4. Implementation Changes
 24* add() no longer checks listener.length because ...varargs listeners cannot be detected.
 25* Dispatching
 26** @joa created a new, faster dispatching engine (SlotList) using an immutable recursive linked list (inspired by Scala). The list is like a snake which gets eaten by a snake, which gets eaten by a larger snake, and so on.
 27** NOTE: Listeners are now called in reverse order, for best performance. If precise order is needed, use an IPrioritySignal. 
 28* Enhanced MXML friendliness (ArrayElementType, better examples). 
 29* More inheritance between signals to reduce code duplication.
 31h4. Fixes
 32* DeluxeSignal: now handles subclass super() calls properly (thanks @stickupkid).
 33* NativeRelaySignal: better checks for null (thanks @stickupkid).
 35h4. Tests
 36* Increased test coverage significantly. Many tests from @stickupkid.
 37* Refactored duplicated test code into base classes, e.g. ISignalTestBase. This greatly increased coverage across various implementations.
 39h4. Build
 40* Build now has a "package" target to zip SWC and source together.
 41* Build now has a "clean" target to remove generated folders.
 42* Flash Player executes on Linux (thanks @joa).
 44h3. v0.8 - Maximilian - 2010-11-14
 46h4. API Changes
 47* Signals are now MXML-friendly! Example:
 49  <signals:Signal id="nameChanged">{[String, uint]}</signals:Signal>
 51** Constructors are now nullable.
 52** valueClasses and eventClass are now writable.
 53** Exceptions: NativeMappedSignal and NativeRelaySignal are not yet MXML-friendly.
 54* Renamed IDeluxeSignal to IPrioritySignal, a more functional name.
 55* New interfaces to grant access to methods that affect all listeners:
 56** ISignalOwner: extends ISignal, IDispatcher, adds removeAll().
 57** INativeSignalOwner: extends IPrioritySignal, INativeDispatcher, adds removeAll().
 58** These 2 interfaces cannot be merged because dispatch(event:Event) conflicts with dispatch(...valueObjects).
 59** Thanks to "Brian Heylin": for getting the ball rolling.
 61h4. Fixes
 62* "#24 - Changing wasn't removing listeners from target.":
 63* "#32 - FIX: Setting NativeSignal.eventClass to null and dispatching causes null exception.":
 65h4. Build
 66* Added continuous integration and unit test execution Ant targets: "ci" and "test".
 67* Updated AsUnit 4 SWC: test failure call stack is more concise and readable.
 68* Removed build-asunit.xml as its functionality has been merged into build.xml.
 71h3. v0.7 - Bubblap - 2010-05-27
 73h4. API Changes
 74* Added NativeMappedSignal class from "Brian Heylin":, with great "test coverage":
 75** Addresses "#16 - Add ability to map native events to signals":
 76* DeluxeSignal has a simpler way to continue bubbling without re-dispatching the event.
 77** IBubbleEventHandler.onEventBubbled() now returns true/false to continue/cancel bubbling.
 78** Thanks to "secoif": for the original code and "dehash": for helping with the merge.
 79* ISignal and IDeluxeSignal: add(), addOnce() and remove() now return the listener.
 80** Thanks to "sammyt": for the contribution with unit tests.
 82h4. Fixes
 83* Improved error message for Signal.dispatch() with too few arguments.
 85h4. Test Changes
 86* The test suite is migrated to a newer version of AsUnit 4.
 87** Tests now receive an IAsync using [Inject]. No more Asyncleton!
 88** The migration pattern can be seen in "commit f6878.":
 89** AllTestsRunner uses a "new composition pattern": instead of inheritance.
 90** Many thanks to "Luke Bayes": and the "Bay Area Computer Club":
 91* Added more tests for argument dispatching and consolidated in SignalDispatchArgsTest.
 93h3. v0.6 - GreenDay - 2010-03-17
 95h4. API Changes
 96* "#15 - IDeluxeSignal and NativeSignal now have valueClasses property":
 98h4. Fixes
 99* "#14 - NativeSignal.addOnce() can't be reused after native event dispatched":
101h4. Implementation Changes
102* Optimized listeners array cloning to use slice(), which is faster than concat().
103* Optimized dispatch() by moving the cloning of listeners to add(), addOnce(), and remove().
104* Signal.removeAll() now uses remove() on every listener, instead of fast array clearing. This is intended to avoid possible issues with subclass overrides (as happened before with NativeRelaySignal.remove()).
105* Renamed createListenerRelationship() to registerListener().
106* Consolidated add() and addOnce() logic in registerListener().
107* Removed onceListeners Dictionary from DeluxeSignal and NativeSignal.
108* DeluxeSignal and NativeSignal are now more unified in their "once listeners" internal implementations.
109* Removed an extra semicolon which made FDT cry (thanks "vitch":
111h4. Test Changes
112* Removed async [Test] metadata because AsUnit 4 no longer uses it.
113* Updated the AsUnit 4 SWC to newer version which avoids slowdown of Timers in Flash Player 10.1.
114* Added tests for ambiguous relationships in Signal.
115* Added tests for adding a listener during a dispatch().
117h3. v0.5 - GlassHalfFull - 2010-02-08
119* Added versioning to the Ant build, starting at 0.5.