I am not to sure that makes sense to me..

Variables are private to that object, so I am not sure what you are trying
to say. In the example you have provided, variables.instance is and should
be used to identify that the instance has been created. The singleton
pattern, so in your example and in my opinion variables.instance would be
available to the extended if it is only setup there, but if you tried to
instantiate the parent there would be no such variable.

So this would be done by the parent in your example, so the child would know
if it needs to be instantiated or if it has already been done so via the
parent. That role should be left to the parent to take care off.

But I guess without knowing the full history of the debate, the example
provided makes no sense to me at the moment. Now if I was to guess, I am
thinking that these people don't understand the singleton or new object
patterns. Because regardless of the objects name, the variable is private to
that object.

So if I have a bike class, and 2 wheel classes each would just check their
own instance variable to check. to see if it has been instantiated or not.
In the case of the wheels class they would be actually seperate instances
and not singleton patterns, so you would need to accommodate something like
that.




On Fri, Sep 12, 2008 at 7:56 PM, Richard White <[EMAIL PROTECTED]> wrote:

> hi
>
> i seemed to have hit a subject that many people have mixed feelings on:
>
> i have been looking into why people use variables.instance in beans, and
> many people see this as the standard.
>
> however some people have put over an argument to do with this could be
> problematic when it comes to cfc's that extend each other, and therefore
> they take the preference that declaring all properties with
> varables.#beanname# would be better.
>
> just wondering what you guys think and if you do prefer variables.instance
> then how would you solve the extends issue
>
> thanks
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312417
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to