Well, Merry Christmas then!
 
<cfset obj = StructNew() /> ? (Don't forget that it'll be compiled into Java byte code before it's run!)
 
Naw, i think i know what you're talking about.
 
What about :
 
<cfset myObj = obj.getInstanceAsStruct() />
 
and all your setters in obj are private?
 
This is what i tend to do, and one of the reasons i opted to use an instance structure within my BO's so i could cleanly pull out the instance. I somehow have a preference for structures in my views and forms. Not exactly sure why tho' ...
 
How's it going with the chick from admissions? ;)
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Dawson, Michael
Sent: Thursday, May 12, 2005 5:39 AM
To: [email protected]
Subject: RE: [CFCDev] LTOs

For me, it's mainly the difference of typing obj.getFirstName() and obj.firstName.
 
I like the structure-like obj.firstName, with the safety of having no setters.
 
I'm aware of the ways to currently handle this in CF, I just wish we had VB-like property setters and getters.  That is my Christmas wish.
 
M!ke


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pat Branley
Sent: Wednesday, May 11, 2005 10:30 PM
To: [email protected]
Subject: Re: [CFCDev] LTOs

if you use some sort of code generator to create your LTOs u could create them as getVarName() in the same time as it would be to create the 'this' scope variables.

or just create your bean with gets and sets, then generate your LTO from the bean and change all the sets to private. This is in essence is what a TO is isnt it ? a read-only bean ?

Pat


Dawson, Michael wrote:
To be able to safely use this.varName in a read-only manner.  Set-able
from internal, but only readable from external.  "Write once, read
many."

If that is not possible, then I would like VB-similar setters and
getters where you call:

<cfset obj.varName = "mike">

Where CF "knows" that I just called the "setVarName" method in "obj".

M!ke 
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] 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).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] 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).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

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

Reply via email to