Page 1 of 1

mixed case option values

Posted: Wed Sep 08, 2010 4:48 am
by TimGrun
Add-ins along with the exec command, pass the values of options in upper case.
How do I pass mixed case option values without creating new variables stored in a workfile?

My add-ins sometimes pass filenames, which might be mixed case. They also pass title or footnote options which definitely will be mixed case.
Forcing users of our add-ins to create string variables stored in a workfile just to pass mixed case option values seems cumbersome.

Option values from the @uidialog are returned in mixed case. It would be nice if add-in option values retrieved with the @equaloption command did the same.

Thanks,
Tim

Re: mixed case option values

Posted: Wed Sep 08, 2010 6:34 am
by EViews Gareth
I'm not sure I follow.

In the following program, which I've given a proc name of MYTEST:

Code: Select all

create u 100 string a = @equaloption("mystr")
If I call that program with:

Code: Select all

MYTEST(mystr="Hello World")
Then the created string will contain "Hello World", i.e. case is kept.

Re: mixed case option values

Posted: Wed Sep 08, 2010 9:40 am
by TimGrun
Thanks Gareth for the reply.

I am guessing that you are calling your add-in, MYTEST, from the EViews command line. That also works for me.
However, calling an add-in from within another program appears to behave differently. All option values are upper cased.
I have an add-in which @uiprompt will show the values of the options after the @equaloption retrieves the values. When the add-in is called at the EViews command prompt, the values remain mixed case.
But when a program is executed at the EViews command prompt, which then calls the add-in, the option values are all upper cased.


I am using EViews version 7.1, Enterprise Edition - Jun 25 2010 build.
I will be upgraded to the August 27 2010 build this afternoon. I will let you know if the same add-in option behavior continues in the new version.

Thanks,
Tim

Re: mixed case option values

Posted: Wed Sep 08, 2010 9:42 am
by EViews Gareth
You are correct. We'll get that fixed.