Figures, as soon as I post, I come up with a solution. I guess setLog () is inherited by the Plugin.cfc's superclass, BaseComponent.cfc. I have a feeling that since I have multiple version of this app running on my server, that the <cfcomponent extends="MachII.framework.Plugin"> is actually resolving to some other MachII mapping in my system and thus trying to extend from an older Plugin class.
Nothing to see here. Carry on... -Brian On Jan 5, 3:25 pm, "Brian H." <[email protected]> wrote: > Ok I am confused. I am looking at the PluginManager.cfc in the M2 > framework of an old version (1.4?) and the configure function lists > as: > > <cffunction name="configure" access="public" returntype="void" > hint="Configures each of the registered Plugins."> > <cfset var aPlugin = 0 /> > <cfset var i = 0 /> > <cfloop index="i" from="1" to="#variables.nPlugins#"> > <cfset aPlugin = variables.pluginArray[i] /> > <cfset aPlugin.configure() /> > </cfloop> > </cffunction> > > So it calls the "configure" method on every plugin in my app. Well, I > went to update an old site with the newest version (1.6) and I got a > crash on framework initialization: > > "The method setLog was not found in component ....\lib\plugins > \AppConstants.cfc." > > Hmm. Well, that is correct, my AppConstants.cfc pluggin does not have > this "setLog()" method, and looking at the super class for plugins in > the new framework (framework/plugin.cfc), it does not inherit it > either. Looking at the PluginManager.cfc in the new framework, I see: > > <cffunction name="configure" access="public" returntype="void" > hint="Configures each of the registered Plugins."> > > <cfset var logFactory = getAppManager().getLogFactory() /> > <cfset var aPlugin = 0 /> > <cfset var i = 0 /> > > <cfloop from="1" to="#variables.nPlugins#" index="i"> > <cfset aPlugin = variables.pluginArray[i] /> > <cfset aPlugin.setLog(logFactory) /> > <cfset aPlugin.configure() /> > </cfloop> > </cffunction> > > Ok, so indeed it is calling "setLog()" on all of my plugins, along > with "configure()". Perhaps this is some new convention that every > plugin must have a setLog() method? I checked the sample plugin > "SimplePlugin.cfc" that ships with the new framework, but it does not > define "setLog()". I checked the M2 reference Wiki and no where on > the plugins page is setLog() listed as a required method for creating > a plugin. I don't see anything in the Changelog either. > > What the heck am I missing here? 1.6 should be a simple drop-in > upgrade with full backwards compatibility should it not? > > -Brian
-- You received this message because you are subscribed to Mach-II for CFML list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/mach-ii-for-coldfusion?hl=en SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/ Wiki / Documentation / Tickets: http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/
