
A-12 Extensibility FAQ
A-12
4. When using FindVariable to set an object reference to an
object in the EDF, when do I use .Variable and when do I use
.Variable.object?
Ans: .Variable is used to access the value of variables in the
EDF, such as numeric entry widgets, radio buttons, and so
forth. .Variable.object is used to reference an object directly
so that the extension is able to access the object properties
and methods. Typically, .Variable is only used for EDF
variables and .Variable.object is only used for process
stream attachments.
5. How do I determine if an object reference actually points to
an object?
Ans: When an object reference is made, the reference may
point to an object which does not exist. For example, when
FindVariable is used to set an object reference to an object
in the EDF. If there is no object (for example, when a feed
stream has not been attached), then the reference points to
nothing. Use the Is keyword to compare the object
reference to Nothing. The following code demonstrates this:
Set hyFeed = hyContainer.FindVariable("FeedStream") .Variable.Object
If hyFeed Is Nothing Then Exit Sub
Komentáře k této Příručce