Aidan,
I have not done it, yet, but the following should give you a good starting point to duplicate a content object.
This code snippet shows how Farcry will create a new content object by setting stProperties structure and a new UUID for the objectID, then calling createData to do the db stuff
<!--- Create New Object --->
<cfset stProperties = structNew()>
<cfset stProperties.objectID = createUUID()>
...
...
<cfset oType = createobject("component", application.types['myGalleryImages'].typePath)>
<cfset stNewObj = oType.createData(stProperties=stProperties)>
Here we are setting stProperties based on the current stObj, assigning a new UUID and creating a new content object. Add any new code replacing the ... to set label, datetimecreated, createdby, etc.
<!--- Copy Current stObj Object --->
<cfset stProperties = stobj>
<cfset stProperties.objectID = createUUID()>
...
...
<cfset oType = createobject("component", application.types[stobj.Typename].typePath)>
<cfset stNewObj = oType.createData(stProperties=stProperties)>
Chris.
Aidan Whitehall wrote:
Is there an elegant way of adding this feature that builds on something that already exists within FarCry, or will I have to hack around in the core (which we've already done for another feature, loathed as I am to do so).
--- You are currently subscribed to farcry-dev as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
