On Tue, Dec 23, 2008 at 10:35 PM, luvfotography
<[email protected]> wrote:

> public function parseResult( result:*):Array {
>
>      if( result is XML || result is XMLList ) {
>         . . . .
>           ...
>
>
> what is the '*' , is this the same as (result:object) ?
> where result can be any type of object?

If you declare a variable to be of type "*" (any type) then there's no
type checking on that variable. You can assign anything to it and you
can assign it to anything. That's at compile-time, of course.

  var obj:* = new Button();
  var tabNavigator:TabNavigator = obj; // OK

Compiles fine, but will give a runtime error.

In most cases, you want to use Object to accept any type. e.g. the
'dataProvider' property in the list classes. Use "*" when you want to
disable compile-time type checking altogether or if you want to
accommodate the undefined type.

-- 
manishjethani.com

Reply via email to