proper setters and getters!
 <cfpropertyaction type="get">
 <cfpropertyaction type="set">

eg:

<cfcomponent>
<cfproperty name="variables._length" type="numeric">
        <cfpropertyaction type="get">
                <cfreturn variables._length />
        </cfpropertyaction>

        <cfpropertyaction type="set">
                <cfargument name="length" type="numeric" required="yes" />
                <cfset variables._length = arguments.length />
        </cfpropertyaction>
</cfproperty>

<cfproperty name="variables._width" type="numeric">
        <cfpropertyaction type="get">
                <cfreturn variables._width />
        </cfpropertyaction>
        <cfpropertyaction type="set">
                <cfargument name="width" type="numeric" required="yes" />
                <cfset variables._width = arguments.width />
        </cfpropertyaction>
</cfproperty>
...{more code}...
</cfcomponent>


so you can go (calling page)

<cfscript>
 myObj.length = 50;
 if (myObj.width GT 100){
        myObj.width = 100;
}
 myObj.update();
</cfscript>



On 5/13/05, Mark Mandel <[EMAIL PROTECTED]> wrote:
> NAMESPACES!!!.. omg...
>  
>  Interfaces for sure as well 
>  
>  Null values would make life a lot easier.
>  
>  A real Constructors would be fantastic as well.
>  
>  Static methods / properties would also be lovely.
>  
>  I would also like to see Arrays, Structs, XMLDocs etc turned into Objects
> in their own right... but I doubt that will actually ever happen.
>  
>  I think that about covers me.
>  
>  Mark
> 
> 
> On 5/13/05, Ben Rogers <[EMAIL PROTECTED]> wrote:
> > Hal,
> > 
> > > Agreed, Brian. Also, one thing that absolutely should make it into CFCs:
> a
> > > null value. Without this, you can't protect against runtime errors.
> > 
> > Wasn't sure what you meant by this so I did a quick search. Unfortunately,
> > all the results had to do with unit testing and null values as special
> > cases. Would you mind explaining this a bit or pointing me at a page that
> > goes into this topic? Gracias.
> > 
> > Ben Rogers
> > http://www.c4.net
> > v.508.240.0051
> > f.508.240.0057
> > 
> > 
> >
> ----------------------------------------------------------
> > 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]
> > 
> > 
> 
> 
> 
> -- 
> E: [EMAIL PROTECTED]
> W: www.compoundtheory.com 
> ICQ: 3094740
> ----------------------------------------------------------
> 
> 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