Hmmm, it might help if I actually post the code.....
TYPE Object
Name AS STRING
ENDTYPE
GLOBAL testObject AS Object
` Create testObject
testObject.Name = "Foobar"
` Print out testObject's name -- ** This works **.
printName(testObject)
` Now let's try the same from inside a function
foo()
WHILE 1
ENDWHILE
FUNCTION foo()
` Create a new object of type Object in here
testObject2 AS Object
testObject2.Name = "Foobar2"
` Try printing out it's name -- ** THIS FAILS **.
printName(testObject2)
` Am I crazy? Let's try printing out the original variable, defined outside of the function. -- ** This works **.
printName(testObject)
` Ok, let's try assigning testObject (which works), to testObject3 (defined in here)
testObject3 AS Object
testObject3 = testObject
` And let's print the results of that. Hmm, ** THIS FAILS TOO **.
printName(testObject3)
` Hmm, can I print the name if I do it without calling a function? ** This works **
print "Name = " + testObject2.Name
ENDFUNCTION
FUNCTION printName(objectToPrint AS OBJECT)
print "ObjectToPrint.Name = " + objectToPrint.Name
ENDFUNCTION