Daniel, I think Ben is trying to achieve the functionality you describe, but using dot notation.  He wants someobject.foo = "test" to acually execute someobject.setFoo('test").

Ben:  why do you need this?  Is there a sufficiently compelling reason to avoid the widely used and familiar setter method approach?

On 2/21/06, Daniel Roberts <[EMAIL PROTECTED]> wrote:
myCFCObject.setFoo("bar")

myCFCObjectDAO.Create(
myCFCObject) <--- writes/persists CFC instance variables and relationships to database

Check out info here:
http://livedocs.macromedia.com/wtg/public/coding_standards/


On 2/21/06, Johnson, Ben R. <[EMAIL PROTECTED]> wrote:
But then how would I implement a custom setter?
 
For example, when someone does myCFCObject.foo = 'bar', I want to be able to write the key and value to the database.
 
Ben
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Nathan Strutz
Sent: Monday, February 20, 2006 5:33 PM
To: CFCDev@cfczone.org
Subject: Re: [CFCDev] Speaking of Structures

Hmm. That would be impossible. CFCs can only extend other CFCs, not actual Java classes, in this case, a Java map.

However, to get dot notation, you don't need to extend a struct, you can just use the public "this" scope.


-nathan strutz
http://www.dopefly.com/



On 2/20/06, Johnson, Ben R. < [EMAIL PROTECTED]> wrote:
I am trying to create a component that extends Struct.  Is this even
possible?

I'd like to be able to implement a customer setter method but have all the
advantages of dot notation.

Ben Johnson


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to cfcdev@cfczone.org with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org

Reply via email to