Read VarName in XOP Operation Handler

Hi,

I am using VarName parameters in a operation, to access variables may be string or numeric type.
The manual only says I can use StoreNumericDataUsingVarName or StoreStringDataUsingVarName to save
store data. [Chapter 5, "VarName Parameter"]
Is it possible to get the numeric or string data out of VarName, say GetNumericDataUsingVarName or GetStringDataUsingVarName?
wang wrote:

Is it possible to get the numeric or string data out of VarName, say GetNumericDataUsingVarName or GetStringDataUsingVarName?


No. The VarName type of parameter was conceived as a way for the operation to return a value to the caller, like the refNum parameter in the built-in Open operation. Consequently I did not think about implementing GetNumericDataUsingVarName or GetStringDataUsingVarName which would be used for input/output parameters. I will add this to the wish list.

For now you will have to use separate operation parameters to pass the input and receive the output.

hrodstein wrote:

No. The VarName type of parameter was conceived as a way for the operation to return a value to the caller, like the refNum parameter in the built-in Open operation. Consequently I did not think about implementing GetNumericDataUsingVarName or GetStringDataUsingVarName which would be used for input/output parameters. I will add this to the wish list.

For now you will have to use separate operation parameters to pass the input and receive the output.



Thanks. That will be very useful when one wants to unify string and numeric parameters.
wang wrote:

That will be very useful when one wants to unify string and numeric parameters.

[/quote]

I'm not sure what you mean by "unify string and numeric parameters". If you mean have one parameter that can be either a string or a number, I would not recommend that. Instead, use two separate flags or keywords, one for the numeric parameter and one for the string parameter. This is simpler to implement and document and is more straight-forward.