You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by pctechtv <ch...@pctechtv.com> on 2015/04/21 20:29:51 UTC
function using method name?
In an online training video I am watching the teacher in Actionscript names
his function the same name as a method of the object in the functions
context. Is this a good programing practice?
private function navigateDown():void { if(!fileGrid.selectedItem)
{ var nothingSelected:NothingSelected = new NothingSelected(); }
fileGrid.navigateDown(); updatePath(); }
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/function-using-method-name-tp10140.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: function using method name?
Posted by Alex Harui <ah...@adobe.com>.
On 4/21/15, 11:29 AM, "pctechtv" <ch...@pctechtv.com> wrote:
>In an online training video I am watching the teacher in Actionscript
>names
>his function the same name as a method of the object in the functions
>context. Is this a good programing practice?
Personally, I don’t see anything wrong with it. In the SDK, setActualSize
and other methods often call setActualSize on the children.
-Alex
> private function
>navigateDown():void { if(!fileGrid.selectedItem)
>{ var nothingSelected:NothingSelected = new NothingSelected(); }
>fileGrid.navigateDown(); updatePath(); }
>
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/function-using-method-name-
>tp10140.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.