303 maddec
07-28-2005, 02:29 PM
Hi there,
I'm used to the following practice:
var myVar:String="george";
function myFunctionA (){
var _owner=this;
function myFunctionB (){
trace (_owner.myVar);
}
}
Since I try hard every day to improve my coding to the best practice possible I'm considering the Delegate way of doing this:
var myVar:String="george";
function myFunctionA (){
function myFunctionB (){
trace(Delegate.create(this,myVar));
}
}
Is there a real advantage against the former in term of use and of good practice?
Thank you for your answer.
Best regards.
maddec
I'm used to the following practice:
var myVar:String="george";
function myFunctionA (){
var _owner=this;
function myFunctionB (){
trace (_owner.myVar);
}
}
Since I try hard every day to improve my coding to the best practice possible I'm considering the Delegate way of doing this:
var myVar:String="george";
function myFunctionA (){
function myFunctionB (){
trace(Delegate.create(this,myVar));
}
}
Is there a real advantage against the former in term of use and of good practice?
Thank you for your answer.
Best regards.
maddec