Tuesday 5 July 2011

How to make visible the comments of your own function, on insight feature pressing the dot, as help of the function


With this way you may give help to the object user about how your function works.

Simply put your remarked text with /** */ above of the function. Do not use /* */ or //, only /** */ you should use for this usage.


/**x is the X coordinate and y is the Y coordinate of the image*/
//TODO: this function might have a bug… I have to check if the image is null!
public function locatePictureAt(x:int,y:int):void{
                image.x=x;image.y=y;
}

In Flex IDE, when you will press the dot to go to the specific function, it will show as help of this function the text placed in /** */. The “TODO” text will be not appered, either if it was placed in /* */.

No comments:

Post a Comment