Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/org/osflash/signals/natives/NativeMappedSignal.as
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,12 @@ package org.osflash.signals.natives
var mappedData:Object = mapEvent(valueObjects[0] as Event);
dispatchMappedData(mappedData);
}
/*
else
{
super.dispatch.apply(null, valueObjects);
}
*/
}

private function areValueObjectValidForMapping(valueObjects:Array):Boolean
Expand Down
18 changes: 18 additions & 0 deletions tests/org/osflash/signals/natives/FakeMouseEvent.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.osflash.signals.natives
{

import flash.events.Event;


public class FakeMouseEvent extends Event
{

public static const CLICK:String = "click";

public function FakeMouseEvent (type:String)
{
super(type);
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ package org.osflash.signals.natives
dispatchTestEvent();
}

[Test]
public function shouldnt_callback_during_checking_of_event_class_type ():void
{
signalMappingToEventType.add(function (value:String):void
{
fail("should fail");
});

sprite.dispatchEvent(new FakeMouseEvent(FakeMouseEvent.CLICK));
}

private function checkMappedEventTypeArgument(argument:String):void
{
assertSame(EventType, argument);
Expand Down