I have a class which accepts an object and then outputs the names and values of it's properties
Code:
class ReaderClass
{
function ReaderClass ()
{
}
//-----------------------------------------------------------------
function getObjectProps (var_objectToExplore:Object)
{
var objectToExplore = var_ objectToExplore
for(var prop in objectToExplore)
{
trace ("prop: " + prop)
}
}
}
now I am using the following code to create a new object:
Code:
class NewClass{
var someProp0
var someProp1
var someProp2
var someProp3
function NewClass(){
someProp0 = new String();
someProp1 = new String();
someProp3 = new String();
someProp2 = new String();
}
}
an instance of NewClass is being sent to be explored by ReaderClass:
Code:
myReaderClass.getObjectProps(myNewClass);
this will return the properties in the following order:
prop: someProp2
prop: someProp3
prop: someProp1
prop: someProp0
and my question is:
Can I be certain that the once running the myReaderClass.getObjectProps() on any class instance the
Properties will always be returned in the order shown above? (n, n-1, n-2…..)