Stack overflow Injecting two models into each other
Hello there,
i'm trying to inject two models (mapped with mapSingleton) into each other and keep getting "Error: Error #1023: Stack overflow occurred."
I'm a newbie so sorry in advance if it's a stupid question but.. what did i do wrong?
Comments are currently closed for this discussion. You can start a new one.
2 Posted by ZackPierce on 14 Nov, 2010 03:17 AM
Here's a work-around to avoid the overflow.
mapValueessentially functions the same asmapSingleton,but with a pre-prepared object instance.On a more pedantic note, it's probably worth asking yourself "why do these two models need direct access to each other, instead of using commands that access the two independently?"
3 Posted by juri on 14 Nov, 2010 09:53 AM
Actually, i just started learning RL (enthusiast so far) and got that error while migrating a project from PMVC. I could reproduct it even in a basic scenario and got curious about the approach to use in such a case.
Your note is in fact not pedantic at all, that error made me wonder about those specific classes (that were two proxies in PMVC) and actually made me rethink their role in the application. Mine was probably a wrong approach, and RL made me notice it. Which, in my opinion, is one of the main framework purposes..
So, many thanks to you and lots of love to RL :)
Stray closed this discussion on 11 Feb, 2011 05:19 PM.