On Tue, Feb 2, 2010 at 11:21 AM, Dave Watts <[email protected]> wrote:
> CF 9 changed this significantly. With CF 9, using CFPROPERTY actually
> creates a public variable in addition to creating documentation. In
> addition to that, it also "creates" accessors and mutators (setters
> and getters). It doesn't actually generate visible code in your CFC,
> but those methods will be available for you to call without you
> actually writing them.

To clarify a bit further, CF9 added an accesssors="(yes|no)" attribute
to the creation of a CFC. If your CFC is defined as Persistent (using
the new ORM functionality) this defaults to Yes and those setFoo and
getFoo functions will be created implicitly. If you do not set the
persistent flag, the value of accessors defaults to No.

Then on individual cfproperty tags you can also specify whether to
create an accessor and/or mutator for that particular property.

I'm not sure what would happen if you set accessors="no" on your cfc
and then declared the cfproperty tags with implicit accessor/mutator
turned on. I'm guessing that it would ignore the attributes in the
cfproperty tags and the variables/functions would not be created.

Cheers,
Judah

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330361
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to