Hi Jim,

I like the sound of that approach, and have tried something similar (but
less developed). So I'd like to see what you have done. Thanks for the
willing to share :)

Elliot
--------------------------------------------------------------
From: "Jim Davis" <[EMAIL PROTECTED]>
Subject: RE: [CFCDev] Comment requests CFC instance vars
Date: Mon, 2 Aug 2004 01:58:16 -0400
Reply-To: [EMAIL PROTECTED]
Sorry - I came into this late so I might be missing something,  but I'm
doing something like this now.

In my case there's a root component extended by all others.  This component
has a generic getter, getProp(PropertyName) and setter,
setProp(PropertyName, Value).

These methods are intelligent enough to use property specific
getters/setters if they're defined.  They test type and the actual
properties are kept in the components variables scope (which means you have
to use the methods to get the values).

The root component also has methods to define, cache and test the type of
property metadata.

Each component wishing to take advantage of this stuff has to call the root
method for caching, cacheDPMetaData() and the root init method,
super.init().  They also have to define their properties by overloading the
defineProps() method and using the setPropDPMetaData() method to set each
property.

It sounds pretty complicated I know, but it quickly becomes second nature
and it's surprisingly fast.

The root component also defines a unique key for each instance, allows you
to determine if init method has been run, tracks a "last access" date/time
stamp and a few other things.

If anybody is interested I'd be happy to post the code someplace.

Jim Davis

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to