2 Replies Latest reply on Aug 19, 2011 11:15 AM by LogaKaru

    what is untyped object in Flex?


      Hi All,


      Currently I have started learning flex. The following sentence is taken from one of a flex book;


      "The void data type, containing only the value undefined, is the default value for all untyped objects, and it is used mostly as a return type annotation for method declarations."


      Could you please explain what is a untyped object in Flex.


      Thanks and regards

      Loganathan. K

        • 1. Re: what is untyped object in Flex?

          Actionscript 3 is a strongly typed language, which means that when you declare a variable, you also declare what type of variable it is. For example, 'var text:String' declares a variable with the name 'text', which is of the type 'String'. You can also declare an untyped variable if you aren't sure what type of data the variable will hold, or if it could hold multiple types of data. Using 'var data:*' declares the variable 'data' as an untyped variable, so you could set its value to a String, Number, Object whatever you choose. When I use them, I tend to type my 'untyped' variables as Object though, as pretty much all data types use Object as their base class.

          1 person found this helpful
          • 2. Re: what is untyped object in Flex?
            LogaKaru Level 1

            Thanks a lot. That was rocket fast response.