////////////////////////////////////////////////////////////////////////////////
//
// DOMPANY NAME
// Copyright 2010 Company Limited
// All Rights Reserved.
//
// NOTICE: COMPANY permits you to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////
Note that it is 80 characters wide.
//--------------------------------------
// Events
//--------------------------------------
/
**
* ASDoc comment.
*/
[Event
/**
* ASDoc comment.
*/
[Event
//--------------------------------------
// Styles
//--------------------------------------
/**
* ASDoc comment.
*/
[Style
/**
* ASDoc comment.
*/
[Style]
//--------------------------------------
// Effects
//--------------------------------------
/**
* ASDoc comment.
*/
[Effect
/**
* ASDoc comment.
*/
[Effect]
//--------------------------------------
// Excluded APIs
//--------------------------------------
[Exclude(name=“horizontalAlign”, kind=“style”)]
[Exclude(name=“verticalAlign”, kind=“style”)]
//--------------------------------------
// Other metadata
//--------------------------------------
[DefaultBindingProperty(source=“text”, destination=“text”)]
[IconFile(“Text.png”)]
include "../core/Version.as";
//--------------------------------------------------------------------------
//
// Overridden methods
//
//--------------------------------------------------------------------------
They extend from column 4 through column 80. The text is indented to column 8.
//----------------------------------
// visible
//----------------------------------
They extend from column 4 through column 40. The text is indented to column 8.
/**
* @private
* Holds something.
*/
var a:Number;
/**
* @private
*/
var b:Number
/**
* @private
* The backing variable for the property.
*/
private var _someProp:Foo;
/**
* Place all comments for the property with the getter which is defined first.
* Comments should cover both get and set behavior as appropriate.
*/
public function get someProp():Foo
{
...
}
/**
* @private
*/
public function set someProp(value:Foo):void
{
...
}
Also, ASDoc comments are applied to metadata tags as well as other constructs within a class so take care that your comments apply to the proper target. If you tag a property as Bindable, your property comment must precede the get function, not the Bindable metadata tag.
[Bindable("somePropChanged")]
/**
* Comments for someProp
*/
public function get someProp():Foo
[code]
Wrong usage:
[code]
/**
* Comments for someProp
*/
[Bindable("somePropChanged")]
public function get someProp():Foo
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)