David Rogers
06/07/2023, 5:12 PMDavid Rogers
06/07/2023, 5:15 PMlazyPropertyGetter
invoking variables["true"]()
, and there's no "true" method, so we fail.
// coldbox/System/ioc/builder.cfc
/**
* Dynamic function injected into the targets to provide lazy functions
*/
function lazyPropertyGetter(){
var propertyName = getFunctionCalledName().reReplaceNoCase( "^get", "" ); // "ORMEVENTHANDLER"
var withLock = function( propertyName, builder ){
lock name="wb-lazy-#arguments.propertyName#" type="exclusive" timeout=10 throwOnTimeout=true {
return arguments.builder( arguments.propertyName );
}
};
var buildProperty = function( propertyName ){
// Build it out
variables[ arguments.propertyName ] = invoke(
variables,
this.$wbLazyProperties[ arguments.propertyName ].builder // invokes variables["true"], fails
);
return variables[ arguments.propertyName ];
};
// .........
The $wbLazyProperties evaluates as follows:
this.$wbLazyProperties[ arguments.propertyName ] === {
builder: "true",
name: "ORMEventHandler",
useLock: true
}
bdw429s
06/07/2023, 5:18 PMlmajano
06/07/2023, 5:36 PMlazy
annotation on any property?lmajano
06/07/2023, 5:36 PMDavid Rogers
06/07/2023, 5:38 PMDavid Rogers
06/07/2023, 5:47 PMlmajano
06/07/2023, 5:47 PMlmajano
06/07/2023, 5:47 PMlmajano
06/07/2023, 5:48 PMDavid Rogers
06/07/2023, 5:48 PMlmajano
06/07/2023, 5:48 PMlmajano
06/07/2023, 5:48 PMlmajano
06/07/2023, 5:49 PMlmajano
06/07/2023, 5:49 PMDavid Rogers
06/07/2023, 6:56 PMlmajano
06/07/2023, 6:57 PMlmajano
06/07/2023, 6:57 PMlmajano
06/07/2023, 6:57 PMlmajano
06/07/2023, 6:57 PMDavid Rogers
06/07/2023, 7:01 PM___cb__lazy_
to namespace it, or dynamic like lazyAttrName="lazy" /*user configurable*/
lmajano
06/12/2023, 9:22 AMlazy
in native CFML. If we make that configurable, then every annotation should be configurable, and even more problematiclmajano
06/12/2023, 9:22 AMinject
lmajano
06/12/2023, 9:22 AMsingleton
lmajano
06/12/2023, 9:22 AMlmajano
06/12/2023, 9:22 AMlmajano
06/12/2023, 9:23 AM