Yes, it's because the name is duplicated. Adding an underscore is the usual
practice to mark properties.
I don't think though, that an internal setter is created automatically.
I guess it's just the error message, which is a little bit misleading.
Cheers,
Ralf.
On 2/13/07, Stembert Olivier (BIL) <[EMAIL PROTECTED]>
wrote:
Hi Mayur,
When you define a member variable, a setter method is internally created.
You have to rename your variable vbox and define it as private.
private var _vbox:VBox;
public function set vbox(val:VBox):void
{
_vbox = val;
}
Rgds,
Olivier
------------------------------
*From:* [email protected] [mailto:[EMAIL PROTECTED] *On
Behalf Of *learner
*Sent:* Tuesday, February 13, 2007 7:54 AM
*To:* [email protected]
*Subject:* [flexcoders] duplicate function definition
Hello all,
When I am doing this :
public var vbox:VBox;
public function set vbox(val):void{
vbox = val
}
Why am i getting a error like *Duplicate function definition *when i am
defining my set vbox function.
Regards
Mayur
---------------------
An electronic message is not binding on its sender.
Any message referring to a binding engagement must be confirmed in writing
and duly signed.
---------------------
---------------------
An electronic message is not binding on its sender.
Any message referring to a binding engagement must be confirmed in writing
and duly signed.
---------------------
--
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany
Phone +49 (0) 221 530 15 35