Read VarName in XOP Operation Handler
wang
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?
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.
December 19, 2008 at 11:49 am - Permalink
Thanks. That will be very useful when one wants to unify string and numeric parameters.
December 22, 2008 at 04:26 am - Permalink
[/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.
December 24, 2008 at 07:17 pm - Permalink