On 9/27/07, Peter Bell <[EMAIL PROTECTED]> wrote:

> The biggest downside with onMissingMethod() or get("FirstName") is that your
> code is much less self documenting.

I think something like Ruby's attr method would come in handy here.
Rather than have onMissingMethod handle any unknown method beginning
with "get" or "set," only have it handle attributes that have been
explicitly registered.

So for example, you might have this code in the psuedo-constructor.
attr("firstname");
attr("lastname");

So that onMissingMethod would handle getFirstname() and getLastname()
but not getMiddlename() or getFristname().



Patrick






-- 
Patrick McElhaney
704.560.9117

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to