Hi all,

I am building a rather massive HTML5 / OOJS project, and happened upon
a nice custom event framework that makes use of Prototype.  I was
rolling my own OOJS framework, but liked what I saw and thought I'd
try integrating Prototype into my work.

My first question (probably of MANY!) is in regard to properties and
accessors.

It does not appear that Prototype forges any sort of accessor for new
classes, but rather just keeps all vars available as "public"
properties, accessible via instanceName.propertyName, correct?

IF that is the case, and I have behavior dependent on a property
change, how do I handle that in the "Prototype" way?  What I had done
before is all of my instance vars were declared with "var" to make
them private, and then exposed with mandatory accessors (getVarName,
and setVarName) if you wanted them publicly available.  Then I could
easily override the setter in a superclass with my own implementation
where I needed to have additional code run when a property was set.

How would I do this in the proper Prototype fashion?

Thanks!

Chris

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to