I decided to experiment with wirebox in a cfwheels app. Is there any reason why my instantiation code wouldn’t work to set a scan location? when i call my getInstance method, passing it the name of a cfc in the scan location folder, it errors out with ‘requested instance not found’, but if i give it the entire path it retrieves it just fine.
<cfset application.wirebox = createObject(“component”,“wirebox.system.ioc.Injector”).init() />
<cfset application.wirebox.scanLocations=[“services”] />
Doug the second line does nothing. You need to use a wirebox binder to config the injector with. Then it will use your config there.
Now if you don’t want a config file then you can do this
Wirebox.getBinder().scanLocations( path )
Ortus Solutions, Corp
ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano
Ah, thanks Luis! The documentation is extremely thorough! Only, it’s lacking a “for dummies/quickstart/here’s a complete basic example” section.