Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219257

Re: Looking for a resource

$
0
0

When you want to fetch some nested property of a given object, you need to write a statement like the following:

var someVar = someInstance.property1.property2;

 

above, someinstance is some object instance (in your case, some virtual machine object), property1 is a property of type of which someInstance is an instance (in your case, VcWirtualMachine), and property2 is a property of type of which property1 is an instance.

 

In your sample code, you are using something like the following instead:

var someVar = someInstance.typename.property2;

 

that is, instead of property name like property1 you are using the name of a type. This is not a valid code. Suppose that the type behind someInstance have 2 or more properties of a same type typename; in this case, which one should be returned by the expression someInstance.typename ?


Viewing all articles
Browse latest Browse all 219257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>