I've got to agree.
I've always scratched my head when I tried to work out what was going
through the heads of the developers of CF when they thought up how
cfproperty was going to work.

Might I suggest that you send a copy of your original email to Tim Buntel at
Macromedia (Blackstone product manager) so that he knows how you'd like it
to work. You never know, he may just make it happen, or possibly has already
done something similar.

Regards 

Darren Tracey
Systems Analyst
Web Applications
p: + 61 7 3232 4091 (x64091)
f: + 61 7 3232 4022
e: [EMAIL PROTECTED]
> l: Lvl 9, 388 Queen St Brisbane QLD 4000
> 
> 
> -----Original Message-----
> From: Barry Beattie [SMTP:[EMAIL PROTECTED]
> Sent: Friday, 2 July 2004 14:24
> To:   CFAussie Mailing List
> Subject:      [cfaussie] CFPROPERTY is rubbish! (was: this)
> 
> 
> 
> the whole "this" episode is partly caused by the useless CFPROPERTY
> (except for WS's, admittedly)
> 
> this is what I thought CFPROPERTY should really be...
> 
> <hypothetical type="wishlist">
> 
> <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>
> 
> </hypothetical>
> 
> now, if you ignore the lack of data validation that the THIS scope can
> provide, you can do this right now with the THIS scope.
> 
> but as SeanC, ScottB, Spike, et al have said, the "THIS" public scope is
> bad (mostly for type checking/validation reasons)
> 
> BUT... how CAN you have properties in CF that works as easily as, say,
> VB's properties? without resorting to passing a million arguments to
> methods (eg in the update() method above)?
> 
> where are the real setters and getters? why is CFPROPERTY so useless?
> 
>  
> my Friday 2c worth
> barry.b
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
> [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/


-----------------------------------------------------------------------------------
This e-mail is sent by Suncorp-Metway Limited ABN 66 010 831 722 or one of its related 
entities ("Suncorp"). 

Suncorp may be contacted at Level 18, 36 Wickham Terrace, Brisbane or on 1800 689 762 
or at suncorp.com.au.

The content of this e-mail is the view of the sender or stated author and does not 
necessarily reflect the view of Suncorp. The content, including attachments, is a 
confidential communication between Suncorp and the intended recipient. If you are not 
the intended recipient, any use, interference with, disclosure or copying of this 
e-mail, including attachments, is unauthorised and expressly prohibited. If you have 
received this e-mail in error please contact the sender immediately and delete the 
e-mail and any attachments from your system.

If this e-mail constitutes a commercial message of a type that you no longer wish to 
receive please reply to this e-mail by typing Unsubscribe in the subject line.


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to