Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Can I find method of module open from within triggered code?
Topic Summary: From code run via a module open trigger, can I determine if a module was opened via Explorer or via link navigation?
Created On: 4-Mar-2007 16:50
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 4-Mar-2007 16:50
User is offline View Users Profile Print this message


Bob Sherman

Posts: 6
Joined: 22-Oct-2002

My application requires execution of one set of code if module was opened via the DOORS Explorer and execution of a different set of code if the module was opened via navigating a link from an object in another module.

From code run via a module pre or post open trigger, can I determine if the module (to which the trigger is attached) was opened via Explorer or via link navigation?
Report this to a Moderator Report this to a Moderator
 5-Mar-2007 13:56
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

I edit this message to say what I was thinking -- you could use isVisible, isEdit, isShared etc to make some deductions about the state that may be accurate enough to satisfy your needs.

Edited: 5-Mar-2007 at 17:10 by ron lewis
Report this to a Moderator Report this to a Moderator
 5-Mar-2007 14:58
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Ron he's talking about opening a module by clicking on a link from another.  That isVisible() check wouldn't work because when you click a link, it opens the module to be viewed, not in the background.  So whether opened from the DOORS explorer or from clicking on a link, that isVisible() check would always return true.



-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 1-Jun-2007 12:31
User is offline View Users Profile Print this message


Frederic GIL

Posts: 7
Joined: 19-Aug-2005

Hi all,

I have the same problem, and I don't find any propertie of Module or Trigger to determine whether the module was opened directly from DOORS Explorer or through link navigation.

One way to solve this issue would be to identify the link which fired the trigger.
Something like :
- Link l = link(current Trigger)
- string s = source(current Trigger)
- ... which desesperately doesn't work ...

Thank you for your help,

Frédéric GIL - frederic.gil@cortim.com



Edited: 1-Jun-2007 at 12:37 by Frederic GIL
Report this to a Moderator Report this to a Moderator
 1-Jun-2007 14:24
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Bob, Hi Frederic,

AFAIK you can not determine wich event triggered the opening of module.

If you explain wherefore you need to distinguish between the two possebilities, this community may help you to find another option for handling that issue?!

I can not really imagine wherefore someone could need this.
It makes much sense to know something about the module state as Ron already mentioned.

Have a nice weekend @all,
Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 1-Jun-2007 18:29
User is offline View Users Profile Print this message


Richard SZCZEPANIAK

Posts: 3
Joined: 20-Oct-2004

> I can not really imagine wherefore someone could need this.

In fact, we need this !
We set up a trigger on opening a module, asking some questions to the user. This trigger should occur only when opening in interactive mode to edit the module.

When you come from a link, we only need to display the target object in the module, without asking anything to the user.

For that reason we need an "open module" trigger of the following kind :
   if (navigating through link)
      {
      ask some question ...
      }
   else // straightforfard open
      {
      do nothing
      }
   end if

But we are open to any suggestion to distinguish both of these behaviours.

Have a good week-end
Richard

richard.szczepaniak@cortim.com

Report this to a Moderator Report this to a Moderator
 1-Jun-2007 19:45
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

You might be able to modify each client dxl software such that the dxl scripts call your dialog box.

Question to be answered is, is ever way that open a module thru the gui implemented in unencrypted dxl?
Report this to a Moderator Report this to a Moderator
 4-Jun-2007 08:59
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

There are three ways to open a module from the GUI.
1. From the explorer file menu.
2. From the explorer toolbar
3. From the explorer listview popup menu.

These options all call one of the functions openReadOnly, openShare or openEdit. These functions are defined in baseWindowCallbacks.inc, which is encrypted so you can't change them.

You can however change baseWindowMenu.inc which contains the calls to these functions.

Wrap, or replace, the calls to these in your own function or use a global togther with a module open trigger. Set the global to record that the module open request came from the GUI, inspect the global (and reset it!) in the trigger.

Unfortunatley this approach requires installing DXL on all the clients which I know it not easy in most organisations.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 4-Jun-2007 09:15
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Richard,

what do you think about to set the default open mode for formal modules to read only.
So when user follows a link (s)he will open the away module in read only mode.

When user explicitely opens the module in shareable/exclusive mode your trigger will see it

So in trigger code you would need only to check for open mode of module to be not read only by using isRead function....


May be that this is an easy to implement option for you

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 6-Jun-2007 08:36
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Some aditional information can be found in Doors manual in chapter "Summary of command line switches"

The interesting option is defopenlinkmode
quote:


One of the following:
READ_ONLY
READ_WRITE
READ_WRITE_SHARED
The default edit mode that formal modules are opened in when you open them by clicking a link arrow in another module.
The parameter is READ_WRITE for exclusive edit mode and READ_WRITE_SHARED for shareable edit mode.
Note that this parameter must be upper case, unless you use the single letter abbreviations (r, w and s).



Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.