views:

78

answers:

3

What is the significance of the $ prefix on some properties of Flex Objects?

e.g. item.$width

+2  A: 

The "$" sign is just part of the subset of the legal chars that can be used for naming Actionscript variables (it's inclusion comes from the EcmaScript specification), so there's no special meaning. All this variables would work:

var $t$t:String = 'a';
var $$$$$$:String = 'a';  
Robert Bak
+2  A: 

$ is a valid character in ActionScript variable/function names; the language doesn't treat variable names starting with $ in any special manner.

The particular API developers might be following a convention to start all private/internal variables with $ - or they're from a language like PHP where all variable names must start with a $

Amarghosh
+6  A: 

The $identifier notation is the used naming convention for mx_internal functions (mostly getters/setters) in the Flex SDK. Whereas the _identifier convention is used for private and mx_internal variables.

For the exact definition of the naming conventions check this page: Coding Conventions - Flex SDK

splash
old habits die hard. personally, $ and _ prefixes in AS3 makes me cringe.
TheDarkInI1978