The other way to handle this if you want to stick with mixin injection, is to move the logic out of init() and into a onDIComplete() method. This is the order that CFCs are dealt with when they are built with WireBox
- createObject(‘yourCFC’)
- yourCFC.init() ← constructor args passed here if any exist
- autowire(youCFC) ← This is where mixin injection happens
- yourCFC.onDIComplete() ← Now you have access to everything.
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com