|
I have some CFCs that extend like the following YN extends Boolean Boolean extends Type Type extends Property Object -----Property ( has init() ) ---------- Type ( does not have init() ) --------------- Boolean ( has init() ) -------------------- YN ( has init() ) When I instantiate the object YN and pass the argument “arguments.value”
the following “Y” Arguments.value is not passed to super! If I do a dump of arguments.value before we call
super.init() in YN the argument is
there, which is fine because its passed to that object. If I do a dump of arguments.value before we call super.init()
in Boolean the argument is
undefined, which is fine. Type does not have an
init() (but if I add one and do a dump the argument is still undefined), so the
init() method of Property is really
called by Boolean. This is where it gets weird, if I do a dump of
arguments.value before we call super.init() in Property it tells me that the value of arguments.value is “String”,
exactly that “String”!.. And this is not because I have forgotten
to put hashes around the argument ( dump( arguments );abort(); - don’t
worry these methods are present in the parent ) I went through the final object Object to see if that had
any arguments called “value” that was set to “String”
but nope! What is going on here? I searched the whole project for every occurrence of “String”
to see if that value was set anywhere, and the answer is no. There is a cfargument <cfargument
name="value"
type="any"
required="no" /> in the init method of the object Property but as you can see its set to required=”no”
and there is no value passed to it from the sub class. Now it gets even weirder, if I remove the above argument and
still dump #arguments# the value argument is gone but instead it says there is
an argument named “2”…..!!! Of course people are going to say “value” is a
reserved word, but I couldn’t find it on the reserved list unless I
looked at the wrong list?? ________________________________ Taco Fleur - E-commerce
Development Manager Shelco Searches & Services An Authorised ASIC Information Broker Ph: + 61 7 3236 2605 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/ |
