Custom attribute

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

johansamuelsson
Posts: 165
Joined: Thu Mar 03, 2011 10:07 pm
Contact:

Custom attribute

Postby johansamuelsson » Mon Jan 27, 2014 8:57 am

Hi

In the example below I'm adding a description and printing it on screen (in row 3 and 4). But if I adding a custom attribute, for example "user", how can I get access to that information. I tried something in row 7, but that does not work?

Code: Select all

wfcreate u 1 series x x.label(d) GDP @uiprompt(x.@description) %user = @env("username") x.label("user") {%user} @uiprompt(x.@user)
Regards Johan

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

Re: Custom attribute

Postby EViews Gareth » Mon Jan 27, 2014 9:05 am

Code: Select all

x.setattr("user") {%user} %user2=x@attr("user")

johansamuelsson
Posts: 165
Joined: Thu Mar 03, 2011 10:07 pm
Contact:

Re: Custom attribute

Postby johansamuelsson » Mon Jan 27, 2014 11:25 am

Thanks, ps typo

Code: Select all

%user2=x.@attr("user")


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests