I am able to create several types of user objects where each will link to different documentation. My question is: can I create only one type of user object, but such that I can change the link/path each time I add the object type to my workfile?
See illustration below of how I want it set up:
Only one type of object in column "Type", both are "crosscountryscore", but "example1" and "example2" would link to different scores.
This is how it is currently. Notice I am creating two different types in order to link to different documentation. This is what I want to avoid.
create object that activates a command when being opened/clicked on
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Posts: 27
- Joined: Tue Dec 13, 2022 4:41 am
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13323
- Joined: Tue Sep 16, 2008 5:38 pm
Re: create object that activates a command when being opened/clicked on
I guess you could use some naming convention, and then in the constructor use _this.@name to parse the name of the object and switch which file gets launched based upon the name. No idea if that will work :D
Follow us on Twitter @IHSEViews
-
- Posts: 27
- Joined: Tue Dec 13, 2022 4:41 am
Re: create object that activates a command when being opened/clicked on
Hehe, ok, I'll make an attempt, we will see how it goes. Thanks for your assistance!
-
- Posts: 27
- Joined: Tue Dec 13, 2022 4:41 am
Re: create object that activates a command when being opened/clicked on
Hey, Gareth,
Everything now works perfectly. Your tip about naming convention and then using _this.@name worked beautifully when implemented in the "viewscores"-file.
I have a question tho - in the appended image you see I try to close the object after it has spawned the documentation. When I use "_this.@name" it does nothing. In case the spawn-command messed up "_this", I also tried the following which does nothing:
I am also unsure if this is the right approach because when I use the close-command with explicit object names (example: close kpi or close q6gap), Eviews crashes more often than not.
I just want to keep my program tidy - any tips on making the objects close automatically after the user has opened the documentation?
Everything now works perfectly. Your tip about naming convention and then using _this.@name worked beautifully when implemented in the "viewscores"-file.
I have a question tho - in the appended image you see I try to close the object after it has spawned the documentation. When I use "_this.@name" it does nothing. In case the spawn-command messed up "_this", I also tried the following which does nothing:
Code: Select all
%closethis = _this.@name
...Executing spawn
close {%closethis}
I am also unsure if this is the right approach because when I use the close-command with explicit object names (example: close kpi or close q6gap), Eviews crashes more often than not.
I just want to keep my program tidy - any tips on making the objects close automatically after the user has opened the documentation?
-
- Posts: 27
- Joined: Tue Dec 13, 2022 4:41 am
Re: create object that activates a command when being opened/clicked on
The documentation for creating user objects is difficult to find, do you have any papers or anything documenting how to configure different types of user objects?
Example of what would be useful in this documentation:
- How to set up different definition files
- Examples of how to customize what view the user gets to see when opening a user object (examples: make object show some text, or make the view close immediately after object has been opened)
- If possible, show how to allow customization of existing object types. It would be particularly useful if we could modify equations and models such that it is easier for our users to access the descriptions of underlying variables.
If you do not have documentation at the moment, could you please provide some?
Example of what would be useful in this documentation:
- How to set up different definition files
- Examples of how to customize what view the user gets to see when opening a user object (examples: make object show some text, or make the view close immediately after object has been opened)
- If possible, show how to allow customization of existing object types. It would be particularly useful if we could modify equations and models such that it is easier for our users to access the descriptions of underlying variables.
If you do not have documentation at the moment, could you please provide some?
Who is online
Users browsing this forum: No registered users and 17 guests