Here is an example of extending a built-in type. It should clear up a
lot. Notice that I extend "farcry.farcry_core.packages.types.dmFlash".
I then add any new properties I need. I did not copy the existing
cfc--you get all those props and methods for free via inheritance.
W:\websites\farcry\farcry_echoLearning\packages\types\dmFlash.cfc:
<cfcomponent extends="farcry.farcry_core.packages.types.dmFlash"
displayname="Flash" hint="Forms the basis of the content framework
of the site. Displays a flash movie in the page." bSchedule="1"
bUseInTree="1">
<cfproperty name="shortName"
type="string" hint="Abbreviated name of the flash file" required="No">
<cfproperty name="flashVersion"
type="string" hint="version of flash player required" required="No"
default="7,0,0,0">
<cfproperty name="SoftwareTitle" displayname="Software Title"
type="string" hint="Title of the software version captured"
required="no">
<cfproperty name="SoftwareVersion" displayname="Software Version"
type="string" hint="Version of the software version captured"
required="no">
<cfproperty name="FileVersion" displayname="File Title"
type="string" hint="Version of this file" required="no">
<cfproperty name="Description"
type="nstring" hint="Storyboard of what is occurring" required="no">
<cfproperty name="Notes"
type="nstring" hint="general notes" required="no">
<cffunction name="edit" access="public" output="true">
<cfargument name="objectid" required="yes" type="UUID">
<!--- getData for object edit --->
<cfset stObj = this.getData(arguments.objectid)>
<cfif NOT IsNumeric(stObj.flashWidth)><cfset stObj.flashWidth =
1024></cfif>
<cfif NOT IsNumeric(stObj.flashHeight)><cfset stObj.flashHeight
= 768></cfif>
<cfinclude template="#this.findType(objectid)#/edit.cfm">
</cffunction>
</cfcomponent>
[EMAIL PROTECTED] wrote:
>Hi Blair,
>
>Sorry I should have explained myself a little better. I didn't change
>the DB directly. What I did was:
>
>copied the dmHTML.cfc to /<my application>/packages/types/ folder and
>also all the contents of _dmhtml folder from the core to a _dmhtml
>subfolder in /<my application>/packages/types/.
>
>In the dmHTML.cfc file I modified line 21 to be:
><cfcomponent extends="farcry.farcry_core.packages.types.types"
>displayname="HTML Page" hint="Forms the basis of the content framework
>of the site. HTML objects include containers and static information."
>bSchedule="1" bUseInTree="1" bFriendly="1">
>
>and added the following:
><cfproperty name="displayPageindex" type="boolean" hint="blah"
>required="no" default="0">
>
>I also modified the _dmHTML/edit.cfm and display.cfm files along the
>lines mentioned in the Wiki for creating custom types. stepDir etc.
>
>I'm assuming it's the last part that I have stuffed up. I might wipe
>the install and have another crack at it tonight.
>
>Cheers
>Mark
>
>
>>
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"farcry-dev" group.
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/farcry-dev
-~----------~----~----~----~------~----~------~--~---