Jeff,

This is a great little tech note in the making you have here :)

The reason you might be encountering some trouble with older instances of objects is left over PLP storage XML in the ../plpstorage directory in core. Basically the state of the PLP is written to disk by default so you can recover if your browser crashes or whatever. I'm really just guessing it but that mechanism records the steps in the PLP on initialisation.

-- geoff
http://www.daemon.com.au/

Jeff Coughlin wrote:
Mike Britton wrote:

I've done the how-to on extending core components, but I've run into a
snag: I'm extending dmHTML, and there are no instructions on how best to
extend a core type that has PLPs.  How is this done?


What I've done in the past is the following (It allows Daemon to make updates to the PLP files in the future. Like maybe fix the "the y2050 bug"). If there is a better way to do this then I am eager to here it :)

1. Create <appname>/packages/system/dmHTML.cfc (and add the fields you need).

2. Create the following directories
<appname>/packages/system/_dmHTML
<appname>/packages/system/_dmHTML/plpEdit

3. Create your extra step file in <appname>/packages/system/_dmHTML/plpEdit
(In this example I call it extrastep.cfm)

4. Copy the file /farcry_core/packages/types/_dmhtml/edit.cfm into <appname>/packages/system/_dmHTML

5. modify your new copy of edit.cfm and add the following anywhere above the plp call
<cfscript>
Variables.stepDir = "farcry/farcry_core/packages/types/_dmNews/plpEdit/";
Variables.CustomStepDir = "farcry/#application.applicationname#/packages/system/_dmNews/plpEdit/";
</cfscript>


6. in the same file, modify the plp call:

6a. Set stepDir=""

6b. for the existing plp steps change their location to be similar to the following:
<farcry:plpstep name="start" template="#Variables.stepDir#start.cfm">


6c. When you add your own custom steps, have them look similar to the following:
<farcry:plpstep name="extrastep" template="#Variables.CustomStepDir#extrastep.cfm">


---------------------

Here's the part I can't figure out. Any dmHTML you've created/edited previously will not be able to use this new extra step, only new ones you create after you've made the above modifications.

Technically I've only done this with dmNews (I modified my example to reflect dmHTML) so maybe this problem doesn't happen with dmHTML. Also, with that same problem in mind. If you change your code during testing you will have to delete the object and create a new one to see the new change.

Perhaps this is fixed with restarting the CF services. If someone can clarify why this happens maybe I wont have as troubling a time coding these core type modifications in the future :)

Best of luck,

-Jeff



--- 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/

Reply via email to