... being used for in flex code? I see example code out there that has
variables like _myVar = myVar, what is this doing?
TIA!
Its just standard practice to use an underscore for private variables.
Dan
On Wed, Jul 16, 2008 at 10:38 AM, Scott [EMAIL PROTECTED] wrote:
… being used for in flex code? I see example code out there that has
variables like _myVar = myVar, what is this doing?
TIA!
Sent: Wednesday, July 16, 2008 3:38 PM
Subject: [flexcoders] What is the underscore '_'
. being used for in flex code? I see example code out there that has
variables like _myVar = myVar, what is this doing?
TIA!
Hi
The '_' preceding a variable is used as a best practice in private
fields because the getters and setters can't have the same name as the
variable.
private var _name:String;
public function set name(name:String):void{this._name = name;}
public function get name():String{return
4 matches
Mail list logo