From: <ndi...@us...> - 2002-10-05 00:54:08
|
Update of /cvsroot/modus/org/bacfug/modus In directory usw-pr-cvs1:/tmp/cvs-serv32222/bacfug/modus Modified Files: basecontentobject.cfc Log Message: removing the config struct, as it is inconsistent with all other components. We'll stick with "instance" since there does not appear to be any good reason to have a separate config struct. Index: basecontentobject.cfc =================================================================== RCS file: /cvsroot/modus/org/bacfug/modus/basecontentobject.cfc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** basecontentobject.cfc 14 Sep 2002 01:22:30 -0000 1.13 --- basecontentobject.cfc 5 Oct 2002 00:54:06 -0000 1.14 *************** *** 2,6 **** <!--- the intialization method to be used when the cfc is instantiated ---> <cffunction name="init" access="public" output="no" returnType="org.bacfug.modus.baseContentObject" hint="The initialization method to be used when a contentObject is instantiated"> ! <cfparam name="config" default="#structNew()#"> <cfparam name="instance" default="#structNew()#"> <!--- set up some of the basics for a content object ---> --- 2,6 ---- <!--- the intialization method to be used when the cfc is instantiated ---> <cffunction name="init" access="public" output="no" returnType="org.bacfug.modus.baseContentObject" hint="The initialization method to be used when a contentObject is instantiated"> ! <!--- <cfparam name="config" default="#structNew()#"> ---> <cfparam name="instance" default="#structNew()#"> <!--- set up some of the basics for a content object ---> *************** *** 15,19 **** instance.id = makeID(); //which persister will we use? Set a default. ! config.persister = "org.bacfug.modus.persistence.simpleFileSystemPersister"; //by default the instance.dateCreated is now() instance.dateCreated = now(); --- 15,19 ---- instance.id = makeID(); //which persister will we use? Set a default. ! instance.persisterComponent = "org.bacfug.modus.persistence.simpleFileSystemPersister"; //by default the instance.dateCreated is now() instance.dateCreated = now(); *************** *** 24,32 **** //create an instance of the persister for this object if we need to, to avoid unnecessary createObject() calls later if(NOT structKeyExists(instance,"persister")) ! instance.persister = createObject("component",config.persister).init(); //initialize the properties of this instance initProperties(); </cfscript> ! <!--- be sure we have an instance.label and instance.labelPlural it a instance.label and a config.plurallabel ---> <cfparam name="instance.label" default="Content Object"> <cfparam name="instance.labelPlural" default="#instance.label#s"> --- 24,32 ---- //create an instance of the persister for this object if we need to, to avoid unnecessary createObject() calls later if(NOT structKeyExists(instance,"persister")) ! instance.persister = createObject("component",instance.persisterComponent).init(); //initialize the properties of this instance initProperties(); </cfscript> ! <!--- be sure we have an instance.label and instance.labelPlural ---> <cfparam name="instance.label" default="Content Object"> <cfparam name="instance.labelPlural" default="#instance.label#s"> *************** *** 410,417 **** break; } ! //if it's a "config" variable, just pop the value into the config case "config":{ config[arguments.property.name] = arguments.property.value; } } </cfscript> --- 410,418 ---- break; } ! /* //if it's a "config" variable, just pop the value into the config case "config":{ config[arguments.property.name] = arguments.property.value; } + */ } </cfscript> |