![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Trigger to open up a hyperlink embedded in Object Text Topic Summary: Created On: 2-Feb-2004 20:30 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: The lack of proper documentation for this stuff is really frustrating. And the on-line DXL reference manual has got even worse for version 7.0. Anyway, I found out about these folders by chance when looking at how Jeremy Dick had implemented the test tracking toolkit. I think these config folders first appeared in version 6.0, but I can't be sure. All the menus are built by scripts in the lib/dxl/config folder. Most of this is unencrypted, so you can change the menus. For example, formal.dxl builds the formal module menus and baseWindowMenu.inc does some of the database explorer menus. The function autoRunDXLFolder is in lib/dxl/utils/autorun.inc. This function simply opens up any files it finds in the given folder, checks that they are valid DXL and then calls eval_ to execute them. By default autoRunDXLFolder is called from formal.dxl, link.dxl and desc.dxl in version 7.0 It was also called from startup.dxl and finish.dxl in version 6.0. This method has some advantages over the "addins" approach: You can control menu availability and grey-out behavior. This is the bit I find hard to understand: these files are included at startup, but you can put conditional statements in to control menu creation that works dynamically. This is not the same as grey-out behavior, you can have different menus for different modules. So, for example you can check for the existence of an attribute, and if it doesn't exist then don't create the menu. In the previous example, I could have put the following code into myPopUp.dxl if (exists attribute "URL Test") { createItem ..... } then the menu option only appears if the attribute exists. Very useful, but be warned that the code needs to be very rugged and have LOTS of defensive code to ensure that attributes exist before reading, null parameters are not accessed etc, etc, etc... Give it a go. | |
![]() |
|
I have a hyperlink embedded in the object text of a module which we are using to house our bugs.
When you double-click on the hyperlink in the object text, it takes you to the bug database I was ask to "hide" the hyperlink and instead, display the bug number in another attribute, e.g. BugNo. with a column header "To go to bug click...". I would like to set up an event or trigger so that when the user clicks on the bug number attribute, it actually launches the hyperlink in the object text. I am not sure how to do this Edited: 2-Feb-2004 at 20:41 by Janet Ma |
|
![]() |
|
![]() |
|
This is a bad solution but it DOES work, sort of. The user must double click on your column, make a change, and then click out before the trigger fires.
The first trigger "PreOpen" fires whenever you double click on any attribute in a column, but it doesn't know which attribute is being edited (nor does it know which column its in). The second trigger ("PreSave") is defined for your attribute and it DOES know, and so it can be made to work. Notice that the "set(trigPreConFail)" disallows the users actual edit. I don't think there is a better trigger solution, until Telelogic supports attribute level "open" triggers. - Louie |
|
![]() |
|
![]() |
|
Thanks Louis, I'll give these scripts a try. I was looking for way to follow a hyperlink programmatically when you double-click on any of these attributes. Too bad Telelogic doesn't support attribute-level pre-post open triggers.
|
|
![]() |
|
![]() |
|
Roger:
I was asked whether it is possible to "hide" the hyperlink information: e.g. http://..../bugs_id?=1 in the Object Text and instead show a "GoTo Bug 1" which disguises the true hyperlink but acts like one. Is that possible? |
|
![]() |
|
![]() |
|
This will give you a way to navigate a URL that is not displayed.
Create a new string attribue called "URL Text" to hold the hyperlink text Create another attribute to hold the name of the URL you want to display in a column. Copy hyper.dxl to the "DOORSHOME/lib/dxl/addins/user" Copy myPopUp.dxl to the "DOORSHOME/lib/dxl/config/formalPopupFiles" folder if you want an option on the popup menu. This is a ltlle crude, but it does work. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
The lack of proper documentation for this stuff is really frustrating. And the on-line DXL reference manual has got even worse for version 7.0.
Anyway, I found out about these folders by chance when looking at how Jeremy Dick had implemented the test tracking toolkit. I think these config folders first appeared in version 6.0, but I can't be sure. All the menus are built by scripts in the lib/dxl/config folder. Most of this is unencrypted, so you can change the menus. For example, formal.dxl builds the formal module menus and baseWindowMenu.inc does some of the database explorer menus. The function autoRunDXLFolder is in lib/dxl/utils/autorun.inc. This function simply opens up any files it finds in the given folder, checks that they are valid DXL and then calls eval_ to execute them. By default autoRunDXLFolder is called from formal.dxl, link.dxl and desc.dxl in version 7.0 It was also called from startup.dxl and finish.dxl in version 6.0. This method has some advantages over the "addins" approach: You can control menu availability and grey-out behavior. This is the bit I find hard to understand: these files are included at startup, but you can put conditional statements in to control menu creation that works dynamically. This is not the same as grey-out behavior, you can have different menus for different modules. So, for example you can check for the existence of an attribute, and if it doesn't exist then don't create the menu. In the previous example, I could have put the following code into myPopUp.dxl if (exists attribute "URL Test") { createItem ..... } then the menu option only appears if the attribute exists. Very useful, but be warned that the code needs to be very rugged and have LOTS of defensive code to ensure that attributes exist before reading, null parameters are not accessed etc, etc, etc... Give it a go. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Tony : Thanks for your help...it is exactly what I was looking for. I love this forum!
Janet Ma |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.