Help with mapSingletonOf

Carlos's Avatar


03 Nov, 2009 12:50 AM

Hey All,

Hope everyone is doing well. I started developing an app using RL 0.9.6 (or somewhere around there) and decided to update to RC3 today. I also downloaded the source for SwiftSuspenders and linked the code to RL (in my case, RL does not use the Swiftsuspenders.swc RC2). I did this because I like to step through the code when debugging.

My issue is as follows: I have 2 services that implement an interface and I map them like so: injector.mapSingletonOf(IDeviceService, GetMicrophone, "IGetMicrophone");
injector.mapSingletonOf(IDeviceService, GetCamera, "IGetCamera");

I have 2 command classes, GetMicCommand, and GetCameraCommand which have injection rules, [Inject(name="IGetMicrophone")] public var service:IDeviceService; and [Inject(name="IGetCamera")] public var
service:IDeviceService, respectively.

For some reason the same class (GetCamera) gets injected into both commands and I am not entirely sure why this is the case. I apologize if this all sounds convoluted! Appreciate the help.

  1. 1 Posted by System on 03 Nov, 2009 03:28 PM

    System's Avatar

    An internal ticket was created for this discussion

  2. Support Staff 2 Posted by Till Schneidere... on 03 Nov, 2009 05:15 PM

    Till Schneidereit's Avatar

    Problem is fixed on my branch, fix should be contained in the next RC.

  3. Shaun Smith closed this discussion on 07 Dec, 2009 04:02 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac