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: Getting current module
Topic Summary:
Created On: 8-Dec-2004 12:39
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.
Answer This question was answered by Peter Chattaway, on Wednesday, December 8, 2004 5:27 PM

Answer:
I wondered if triggers were the solution.
Thanks Tony.
 8-Dec-2004 12:39
User is offline View Users Profile Print this message


Peter Chattaway

Posts: 14
Joined: 6-Apr-2004

I have a dialog box which remains open, and I want it to work on the most recently opened (i.e. "current") module, yet I cannot get it to identify that module.

If my code is run from the DOORS explorer then it will return error "null Module parameter was passed into argument position 1"

If it is run from with a particular module it always returns the name of that module, never the most recently opened module.

So how do I get the most recently opned module?

Here's my code which demonstrates the problem

DB dbTest = topMost "Get Current Module"
void fnTest(DB Test)
{
Module modCurrent = current
ack name modCurrent
}

apply(dbTest, "GET", fnTest)
show dbTest


Report this to a Moderator Report this to a Moderator
 8-Dec-2004 15:53
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

I struggled with this one for a while too.

DOORS loses the "current" thing when the window focus changes so you can never get current Module or current Object to return what you are after.

I was interested in the current Object. My solution was to create a persistent trigger that fired on an object sync event. The trigger sets a global Object variable to the current object.

Not ideal, but it works.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 8-Dec-2004 17:27
User is offline View Users Profile Print this message


Peter Chattaway

Posts: 14
Joined: 6-Apr-2004

Answer Answer
I wondered if triggers were the solution.
Thanks Tony.
Report this to a Moderator Report this to a Moderator
 9-Dec-2004 16:44
User is offline View Users Profile Print this message


Peter Chattaway

Posts: 14
Joined: 6-Apr-2004

After thinking "how simple", it took me a while to sort this out.
I've attached some code which could help
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.