I try to do an inherit component and when I use variables structure all of my variables are used too in inherit component.
Correct. 'variables' scope behaves like protected in Java so any derived component can see your protected data.
I must use a specific name structure that I hope another people doesn't use it in inherit component to be sure that he can't change my variable in first component.
Bear in mind that inheritance is a very tight coupling between two components. If you are writing components that you expect other developers to extend, you need to program in a slightly different style because you are essentially writing a *framework* - you need to write your base components in a very defensive style and document them very clearly.
If you don't want derived components to overwrite your variables, you need to keep all of your 'private' variables in a single, somewhat cryptically-named struct (e.g., variables.__{cfcname}__ where {cfcname} is the name of your component) and you need to document that name is 'reserved' for your framework code in each CFC.
Why variables struct is used in all inherit components and not specific to the component ?
Because 'variables' scope is like Java protected.
It seems that first component is included in the inherit component ? right or not ?
Right.
Sean A Corfield -- http://www.corfield.org/blog/
"If you're not annoying somebody, you're not really alive." -- Margaret Atwood
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
