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: Louie's TidBit #6: 'Current'
Topic Summary:
Created On: 28-Oct-2003 18:56
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.
 28-Oct-2003 18:56
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

It appears the following are true about the 'current' object/module/folder/project.

>>> obj = current WILL get the currently selected object in the current module. This command is therefore usefull in a callback button/apply.
>>> mod = current will NOT get the currently displayed module; it will get the one that the DXL thinks is current. This command is not particularly useful in a callback.
>> the current module changes when you successfully open another module, but does NOT change if you attempt to open an already open module. mod1 = read(Name, false) will change the current to mod1 if Name is not already open; otherwise it does NOT change the current module.
>>> folder/project = current gives you the folder/project housing the current module when the script is first invoked. If no current module, it gives the currently selected folder/project in the DOORS explorer when the script is first invoked. Don't expect different results in a callback.

You can CHANGE the current with the "current = obj/mod" etc commands. This mostly makes sense for Modules, since many DXL commands presume the "current" module, especially commands dealing with attributes.

Conclusion: remember your current module if you need it. Almost all my scripts have a "Module g_mCurr = current" at the top. Be ready to set the current to that module when using current sensitive commands.

- Louie
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.