I'm working on this. ~Tom
-----Original Message----- From: Brendan Sisson [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 22, 2003 5:06 PM To: FarCry Developers Subject: [farcry-dev] Extending Core Types eg dmProfile As Geoff was starting to explain yesterday, we have discussed internally how we plan to go about extending core types such as dmProfile, without having to hack the core code. I thought I would write up our plans here in case anyone is interested in implementing the changes. As Geoff said yesterday, it is not the highest of our client priorities at the moment so may be a little while until we get around to doing it. Extending core types is a pretty simple concept in the end. On application initilisiation we add a new value to the type strucutre, typePath. This typePath value is determined by the following: - is it a core type? - Yes - is the type extended? (determined by cfc in appName/packages/system ) - Yes (typePath = application.extendedPackagepath.types.typename) - No (typePath = application.packagepath.types.typename - standard core type) - No (Custom type so typePath = application.customPackagepath.types.typename) Having this value in the application types structure means there is no need for conditional code throughout the codebase testing for custom types etc to work out packagepath. If for example you wanted to extend dmProfile you would create a cfc called dmProfile and save it your appName/packes/sytem directory so that it is picked up on initilisation (as above). This cfc would need to extend farcry.farcry_core.packages.types.dmProfile to inherit existing methods and properties. To add a new property called country for example , your extended cfc may look like this: <cfcomponent extends="farcry.farcry_core.packages.types.dmProfile" displayName="Profiles"> <cfproperty name="country" type="string"> </cfcomponent> Note you may need to write custom edit handlers etc for your extended types. So really all that is required to implement this change is to update the initilisation code to set this typePath variable, and then modify all createObject calls to use this typePath variable instead of application.packagepath or application.custompackagepath. Sound easy? Anyone interested in implementing? :) -Brendan http://farcry.daemon.com.au --- You are currently subscribed to farcry-dev as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] --- You are currently subscribed to farcry-dev as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
