sayantan dutta

How to assign an instance of a class to the object at runtime

Discussion created by sayantan dutta on Feb 10, 2010
Latest reply on Feb 12, 2010 by Andrei Palskoi

Hi,

 

I have declared an object in Blaze IDE.I want to assign an instance of a class to the object at runtime.

 

example:

I have a employee class named emp having property name.

 

emp is a employee.

obj as an object.

obj= emp.

print(obj.name)

 

Above code is giving an error "name is not a property of object"

 

Please help.

Outcomes