Can _this be used to run a subroutine with many arguments?

For tips, questions and general information about writing Add-ins, how to package them, and how to submit them to EViews for publication.

Moderators: EViews Gareth, EViews Moderator

KUN0
Posts: 51
Joined: Thu Feb 23, 2012 9:17 am

Can _this be used to run a subroutine with many arguments?

Postby KUN0 » Tue Feb 18, 2014 12:22 pm

I have a subroutine called allplot which I'm using to generate many charts, and I'd like to turn it into an addin, but when I try setting _this equal to my string variable with all of my inputs it doesn't work...

My subroutine looks like this: subroutine allplot(string %serieslist,string %sample,scalar steps, string axis)

I've created a string variable of my inputs: string temp="""wd_lei wd_ipyoy ez_ipyoy us_lei us_ipyoy ca_ipyoy ca_lei"",""1995 2014"",3,""r"""

when I try running my addon (allplotter): allplotter(this=temp)

I get an error citing insufficient arguments.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13294
Joined: Tue Sep 16, 2008 5:38 pm

Re: Can _this be used to run a subroutine with many argument

Postby EViews Gareth » Tue Feb 18, 2014 12:40 pm

_this cannot be set, only read. It always refers to the currently open (focused) object. You would have to use the show command to open up and show an object in order to set _this.
Follow us on Twitter @IHSEViews


Return to “Add-in Writing area”

Who is online

Users browsing this forum: No registered users and 3 guests