by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 07 16:33
    dependabot[bot] labeled #131
  • Sep 07 16:33
    dependabot[bot] opened #131
  • Sep 07 16:33

    dependabot[bot] on npm_and_yarn

    Bump http-proxy from 1.18.0 to … (compare)

  • Sep 07 16:32
    dependabot[bot] labeled #78
  • Sep 07 16:32
    dependabot[bot] opened #78
  • Sep 07 16:32

    dependabot[bot] on npm_and_yarn

    Bump http-proxy from 1.18.0 to … (compare)

  • Sep 07 16:18
    dependabot[bot] labeled #142
  • Sep 07 16:18
    dependabot[bot] opened #142
  • Sep 07 16:18

    dependabot[bot] on npm_and_yarn

    Bump http-proxy from 1.18.0 to … (compare)

  • Jul 30 13:29
    dependabot[bot] labeled #77
  • Jul 30 13:28
    dependabot[bot] opened #77
  • Jul 30 13:28

    dependabot[bot] on npm_and_yarn

    Bump elliptic from 6.5.2 to 6.5… (compare)

  • Jul 30 13:25
    dependabot[bot] labeled #141
  • Jul 30 13:25
    dependabot[bot] opened #141
  • Jul 30 13:25

    dependabot[bot] on npm_and_yarn

    Bump elliptic from 6.5.2 to 6.5… (compare)

  • Jul 30 13:20
    dependabot[bot] labeled #130
  • Jul 30 13:20
    dependabot[bot] opened #130
  • Jul 30 13:20

    dependabot[bot] on npm_and_yarn

    Bump elliptic from 6.5.2 to 6.5… (compare)

  • Jul 02 16:09
    danrostron commented #150
  • Jun 26 19:03

    tiagoschenkel on npm_and_yarn

    (compare)

Jeff Onsea
@jeffonsea
Uncaught Error: No matching bindings found for serviceIdentifier: DemoMediator
    at _validateActiveBindingCount (planner.js:62)
    at _getActiveBindings (planner.js:48)
    at _createSubRequests (planner.js:91)
    at planner.js:115
    at Array.forEach (<anonymous>)
    at planner.js:114
    at Array.forEach (<anonymous>)
    at _createSubRequests (planner.js:94)
    at Object.plan (planner.js:136)
    at container.js:318
is it possible this is happening because of a circular dependency ?
The DemoMediator is mapped by the way
private mapStateMediators(): void {
    this.sceneMediatorMap.map(Boot).toMediator(BootMediator);
    this.sceneMediatorMap.map(Preload).toMediator(PreloadMediator);
    this.sceneMediatorMap.map(Main).toMediator(MainMediator);
    this.sceneMediatorMap.map(Demo).toMediator(DemoMediator);
    // this.sceneMediatorMap.map(GameTitle).toMediator(GameTitleMediator);
    // this.sceneMediatorMap.map(Main).toMediator(MainMediator);
    // this.sceneMediatorMap.map(GameOver).toMediator(GameOverMediator);
  }
Jeff Onsea
@jeffonsea
OK, if i remove @inject(DemoMediator) from the command im using the error disapears, but isnt the mediator + commands suposed to be the Controller in this MVC+S ?
Tiago Schenkel
@tiagoschenkel
@jeffonsea, the mediators are not injected into the context, they are created as soon as the view appears on the stage and they are removed as soon as the view is removed from stage. You use the mediator to make the link between the view and the rest of the MVC model, acting as a bridge, but you never inject the mediator somewhere else
Tiago Schenkel
@tiagoschenkel

I'm having the feeling that you are still learning the Robotlegs concepts, it's fine. But then would be great if you can take a look at this book:
http://shop.oreilly.com/product/0636920021216.do

You can read parts of the book for free at Amazon:
https://www.amazon.com/ActionScript-Developers-Guide-Robotlegs-Applications/dp/1449308902

The book will help you to understand the concepts behind the framework and how to use it properly. Unfortunately the robotlegs.org domain was removed from the internet, they had a forum and so on, but appears that their hosting provider went offline recently. But you still can check their github repo for documentation and references.

BTW, since the RobotlegsJS is a port to TypeScript of the original AS3 version, there are still a lot of things to do. Would be good to also migrate their official documentation and adapt the code examples to our case, but this will take some time and help will be needed, :)

If you would like to contribute, feel free to take a look here:
https://github.com/RobotlegsJS/RobotlegsJS/blob/master/CHANGELOG.md#v100---planned-stable-version

We already added the documentation but had no time yet to update it:
https://github.com/RobotlegsJS/RobotlegsJS/tree/master/docs/robotlegs

Jeff Onsea
@jeffonsea
Thanks @tiagoschenkel , yes i'm learning the robotlegs framework and still dont get some of the components right, i've read through the AS3 examples and docs to try and understand as much as possible. Porting the docs to this port would be great and help others like me to learn it faster. If i generate any worth docs i will let you guys know, maybe it could be of use.
Tiago Schenkel
@tiagoschenkel

this article have the classic robotlegs diagram, it will help you to understand the general idea behind the framework:
https://bharatria.wordpress.com/2012/04/19/introduction-to-robotlegs-architecture/

if you would like to contribute with the migration of documentation, I can create a branch and add you as a contributor

we also have an domain for the RobotlegsJS framework:
http://robotlegsjs.io/

the content is being generated from this repo:
https://github.com/RobotlegsJS/robotlegsjs.github.io

it's also possible to create a kind of a blog and add posts or tutorials in the near future

Jeff Onsea
@jeffonsea
I will try and learn it first and if i get confortable enough i will be interested in helping with that :)
Tiago Schenkel
@tiagoschenkel
sure
BTW, the plugin for Phaser v3 is already released, you can start using it:
https://github.com/RobotlegsJS/RobotlegsJS-Phaser
Jeff Onsea
@jeffonsea
Great! I'll take a look.
Gnun Ulikhanyan
@gnunua
Hey there. I have opened a pull request in RobotlegsJS-Phaser to support mediators for the container Game Object.
RobotlegsJS/RobotlegsJS-Phaser#55
@tiagoschenkel please review.
Thanks.
Tiago Schenkel
@tiagoschenkel

Hi @gnunua, I already checked your issues and pull request and I'm planning to validate the merge request this weekend.

Can I have write access to your repo?
https://github.com/gnunua/RobotlegsJS-Phaser

I will probably do some small changes before accepting the merge request, will be quicker to work directly in your repo, :)

Gnun Ulikhanyan
@gnunua
Hey @tiagoschenkel. Thanks for your message. The write access response is waiting for you :)
Tiago Schenkel
@tiagoschenkel
@gnunua, I sent you PM, pls check when you will have some time, ;)
Gnun Ulikhanyan
@gnunua
Hey there. Is there any way to pass data with the event to macroCommand. With regular Command, you can receive the event as an argument of the execute method or also it is possible to inject it in command. The same process seems to problematic with the macrocommands ( macrobot package)
Tiago Schenkel
@tiagoschenkel

one way to pass data to the SubCommands is defining a payload:
https://github.com/RobotlegsJS/RobotlegsJS-Macrobot#using-payloads

there is one open issue that could be related, since is mentioned that the event is not mapped into the context so is not possible to use the event (or some data from the event) as a payload:
RobotlegsJS/RobotlegsJS-Macrobot#49

I don't have a solution yet for this problem, I asked for more details about the issue but have no answer so far

personally I prefer to use Signals mapped to MacroCommands instead of events, you can also take a look at this extension:
https://github.com/RobotlegsJS/RobotlegsJS-SignalCommandMap

this extension is lacking proper documentation, but it has the same behaviour as the origjnal AS3 implementation.

a good guide could be this one:
http://joelhooks.com/2010/02/14/robotlegs-as3-signals-and-the-signalcommandmap-example/

It is important to note that the parameters passed via the Signals dispatch() method will be instantly mapped and unmapped when the command is executed. If you’ve previously mapped a class that is being delivered via a Signal command mapping, that mapping will be overwritten and removed. To avoid this, favor using typed value objects as Signal parameters.
when dispatching one signal you can define parameters, and these parameters will be mapped inside the context of all commands and sub-commands
Gnun Ulikhanyan
@gnunua
@tiagoschenkel Thanks for the answer. looking through the RobotlegsJS-SignalCommandMap.
Gnun Ulikhanyan
@gnunua
Hey @tiagoschenkel. I have tested RobotlegsJS-SignalCommandMap.
In the case of regular commands, everything works great. With macro commands parameters passed to signal's dispatch method is undefined when injecting in command.
Here is the example code :
  1. this.signalCommandMap.map(TestSignal).toCommand(RoundStartCommand);
 this.testSignal.dispatch(999);
@injectable()
class TestSignal extends Signal {
  constructor() {
    super(Number);
  }
}

export default TestSignal;
@injectable()
export class RoundStartCommand extends SequenceMacro {
  @inject(Number)
  private myNum: number;

  public prepare(): void {
    // here  this.myNum is undefined
    this.add(SubCommand);
  }
}
Tiago Schenkel
@tiagoschenkel

there is a specific unit test for this case:
https://github.com/RobotlegsJS/RobotlegsJS-SignalCommandMap/blob/master/test/robotlegs/bender/extensions/signalCommandMap/impl/signalCommandTrigger.test.ts#L144

you need to specify the valueObjects and valueClasses in the signal:

@injectable()
export class ParametersSignal extends Signal {
    constructor() {
        super(Boolean, Number, String, Symbol, Object, Date, Array);
    }
}
but let me check here what else is involved
Gnun Ulikhanyan
@gnunua
I have specified valueClasses and it works great with Regular commands. The problem appears on Macro Commands.
Tiago Schenkel
@tiagoschenkel
can you open an issue on the macro command repo providing an example that should work?
Gnun Ulikhanyan
@gnunua

Sure, but let to be clear I did everything right. My sub command looks like this:

@injectable()
export class SubCommand implements ICommand {
  @inject(Number)
  private myNum: number;

  // override
  public execute(): void {
    console.log(this.myNum);
  }
}

In this case I got the following error:

Uncaught Error: No matching bindings found for serviceIdentifier: Number
BTW, In macro Command injected number is undefined inside prepare
method ( it means I can not pass payload to subcommand ) but I got the expected value in execute method.
Tiago Schenkel
@tiagoschenkel
I was taking a quick look in the source code of the AbstractMacro and also noticed that the command is not passing any parameter, so this appears to be a problem on the macrobot extension. Event parameters or Signal payloads are not processed, :thought_balloon:
Tiago Schenkel
@tiagoschenkel
@gnunua, I managed to solve the issue related to the prepare method and the issue of not mapping the payloads into the context of the sub-commands :tada:
RobotlegsJS/RobotlegsJS-Macrobot#68

I added a new section to the README describing how to send parameters to the macro commands using Events or Signals:
https://github.com/RobotlegsJS/RobotlegsJS-Macrobot#macro-command-triggers

I also added some test cases to ensure that these parameters are accessible inside the context of the sub-commands:
https://github.com/RobotlegsJS/RobotlegsJS-Macrobot/blob/master/test/robotlegs/bender/utilities/macrobot/impl/signalsMappedToMacro.test.ts

Gnun Ulikhanyan
@gnunua
Nice! Thanks for your efforts.
Gnun Ulikhanyan
@gnunua
Hey @tiagoschenkel . I hope you are doing well. Would like to notify that find some issue on macrobot. I have opened an issue:
RobotlegsJS/RobotlegsJS-Macrobot#88
Tiago Schenkel
@tiagoschenkel
Hi @gnunua, can you add a comment there with the error message that you are seeing in the console?
Gnun Ulikhanyan
@gnunua
sure, will comment on github
danrostron
@danrostron
Hi @tiagoschenkel , I have an implementation problem using RL 2. Basically our app has a load of startup commands which need to happen before we start building views. The way I achieved this before was to dispatch a event directly after mapping it in the MyConfig class:

`@injectable()
export class MyConfig implements IConfig {

@inject(IEventCommandMap)
private commandMap: IEventCommandMap;

@inject(IEventDispatcher)
private eventDispatcher: IEventDispatcher;

public configure () {

    this.commandMap.map(SystemEvent.INITIALISE, SystemEvent).toCommand(InitialiseGame);

    this.eventDispatcher.dispatchEvent(new SystemEvent(SystemEvent.INITIALISE));
}

}
`

This works in version 1, but in version 2 results in a runtime error:
Uncaught Error: No matching bindings found for serviceIdentifier: Symbol(IContext)
I've tried to dispatch this event after context creation, and in the initialize method of context, but both fail silently to trigger the InitialiseGame command
danrostron
@danrostron
Any ideas as to how I should be triggering an event immediately after context creation?
Tiago Schenkel
@tiagoschenkel
Would it be possible to create a simple project that is generating this error? It could be some empty classes with log messages, just to see which commands/signals are being executed and where the error that you mentioned is appearing. Pls, attach your package.json file (only with the public dependencies). Without looking at the code is hard to guess what is not working as expected.
danrostron
@danrostron
Thanks for getting back to me. Would you believe it? I stripped everything out apart from the RL core classes to provide a demo for you, and it works! So....it must be something else in my codebase which is causing this error. It's a little difficult to debug because the error doesn't give me anything specific to my classes. Will investigate some more...