Git Product home page Git Product logo

signals-extensions-commandsignal's Introduction

signals-extensions-commandsignal's People

Contributors

joelhooks avatar neilmanuell avatar stray avatar texastoland avatar zackpierce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

signals-extensions-commandsignal's Issues

SignalMap and SignalMediator?

Hi Joel,

I was wondering if something like this would be feasible. Based on how the EventMap works, I've implemented a first draft of the mentioned above: Matan@1b773ee

The reason for this is because I'd like signal to automatically "unmap" once the view has been removed from stage. The EventMap has made me quite lazy towards clean up, so I'd like the same functionality, but with Signals. :)

Sample:

override protected function onRegister():void{
    signalMap.add(view.onUpdate, update_handler);
}

protected function update_handler():void{
    trace("View dispatched onUpdate");
}

This code the above is a bit redundant as the view will hopefully be cleaned up properly and reference to the signal and handler is lost once the Mediator and view are disposed. For good measure I always remove listeners added to the view signal manually. With SignalMap it won't be required any more as I should have piece of mind that it's been taken care of.

But, if you are listening to a shell Signal that's not disposed once the view is dispose the Mediator will linger in memory and thus the view.

[Inject]
public var userDataReadySignal:UserDataReadySignal;

override protected function onRegister():void{
    signalMap.add(userDataReadySignal, dataReady_handler);
}

protected function dataReady_handler():void{
    trace("Shell dispatched userDataReady");
}

Using the SignalMap in the case above doesn't require manual clean up.

Let me know what you think. :)

Thanks,
Matan

SignalContext no workee with RL 1.1.0

I tried building my project with RL 1.1.0b7 (which I believe I need for the Modular RL extension--in any case, 1.0.3 was missing some property or other), and while it builds fine, at runtime, I get the error:

Variable org.robotlegs.base:ContextBase::Injector is not defined

in SignalContext.as, line 24. Any ideas?

SignalCommandMap#execute missing?

I'm not sure whether this is intentionally, but I noticed that SignalCommandMap misses an 'execute' method. Maybe it's good to add it, so it's more conform CommandMap?

Injector Warnings

Hi, I just updated my current project from RL 1.4 to 1.5.1 and everything seems fine, except that I get this warning everytime that I dispatch a new Signal. The Signal carries a Sprite and a String reference.

Warning: Injector already has a rule for type "flash.display::Sprite", named "".
If you have overwritten this mapping intentionally you can use "injector.unmap()" prior to your replacement mapping in order to avoid seeing this message.
Warning: Injector already has a rule for type "String", named "".
If you have overwritten this mapping intentionally you can use "injector.unmap()" prior to your replacement mapping in order to avoid seeing this message.

Am I doing something wrong? I don't understand what the warning means.

Cannot use a Vector in SignalCommand

This is a brilliant library, however I can't seem to be able to inject a Vector of a custom type into a SignalCommand. The Vector is the payload of the signal that the command is registered to. All other types seem to work ok; Vector is the only one I've come across so far that doesn't. I can provide code samples if you need them.

Cheers,

Mark

A rename is in order

GitHub now allows us to rename repos. I already renamed my fork to robotlegs-extensions-SignalCommandMap.

  1. It's SCM, not CS.
  2. It's an extension of RobotLegs, not of Signals.

Signal Command Map injector not passing in application domain to child

Hi,
I'm using signal commands + your modular extensions to robolegs. I have some submodules loading up and noticed a bug where if i make a command inject some classes that exist in my submodule, even if the command is in a submodule it'll complain that it can't get the descritpion from the application domain and the injection will fail. This is fixed by changing this line of code in SignalContext.

public function get signalCommandMap():ISignalCommandMap
{
return _signalCommandMap || (_signalCommandMap = new SignalCommandMap(injector.createChild(injector.
applicationDomain)));
}

unit test failed with as3-signal 0.8

2/42 failed:

  1. failure message="Expected: [<[class SampleCommandA]>, <[class SampleCommandC]>] but: was [<[class SampleCommandC]>,<[class SampleCommandA]>]" type="org.robotlegs.base::GuardedSignalCommandMapTests.three_commands_with_different_guards_fire_correctly"
  2. failure message="Expected: [<[class SampleCommandA]>, <[class SampleCommandC]>] but: was [<[class SampleCommandC]>,<[class SampleCommandA]>]" type="org.robotlegs.base::GuardedSignalCommandMapTests.signal_values_passed_to_guards"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.