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: Inhibit View Changes Warning
Topic Summary:
Created On: 7-Oct-2008 11:08
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.
 7-Oct-2008 11:08
User is offline View Users Profile Print this message


Simon Hillman

Posts: 7
Joined: 21-Apr-2006

Does anyone one know if there is a DXL command to inhibit the warning given when a module is closed, if the view has changed, without changing the Client options to inhibit these warnings.

My code is opening a module and applying a filter. Currently whenever the module is subsequently closed the user is given the prompt that the current view has changed, and if they proceed the view changes will be lost. I would like to stop this warning appearing for the closure of this module.

Any ideas appreciated.
Report this to a Moderator Report this to a Moderator
 7-Oct-2008 12:59
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Tools -> Options -> Settings -> Under Warn uncheck "When view changes are to be lost"

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 7-Oct-2008 14:42
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

There is an undocumented close command:

close(Module, bool DoSave, bool IgnoreViewChanges).

So you can issue: close(mod, false, false) to close the module and ignore view changes.

- Louie
Report this to a Moderator Report this to a Moderator
 21-Oct-2008 13:49
User is offline View Users Profile Print this message


Simon Hillman

Posts: 7
Joined: 21-Apr-2006

Thanks for those replies.

Ref David's reply, this is changing the options on the DOORS Client, and not what I want to be doing.

Ref Louie's reply, always good to discover another un-documented feature, but the module concerned will just be left open for the user to close manually, rather than being closed by my code.

What I'm after, is a dxl command that would in effect apply the IgnoreViewChanges to the open module, so that when it is closed manually, no prompt is displayed to save the view, without changing the users Client options, i.e. I don't want to turn this feature off for normal operation, just for this particular occasion.

One possibility I suppose would be to apply a dynamic pre-close trigger to the module, that uses the command Louie mentioned.
Report this to a Moderator Report this to a Moderator
 21-Oct-2008 17:47
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

I wonder if your dynamic pre-close module trigger will find itself in an infinite loop, as it tries to close the module. Perhaps deleting the trigger itself while inside the trigger, and also set(trigPreConFail) may do the trick.

Another trick inside the trigger may be to load the standard view using undocumented:

bool load(Module, View, bool)

where I think the 3rd parameter means "don't check for view changes". Then let the module close naturally.

- Louie
Report this to a Moderator Report this to a Moderator
 23-Oct-2008 15:13
User is offline View Users Profile Print this message


Simon Hillman

Posts: 7
Joined: 21-Apr-2006

The bool third argument at the end only inhibits the warnings for that 'load', i.e. for the loading of the specified view, and doesn't inhibit the warnings, when the module is closed.

The following code works, it basically checks if the 'Warn when view changes are to be lost' option is set on the client, then if they are it turns them off, and applies a post close dynamic trigger to turn the warnings back on after the module has been closed. Only problem, is if you then close any other modules prior to closing the module with the trigger, you won't get the 'Changed view' warning.


Module m = current
string mFullName = fullName(m)

void closeWithoutViewWarning(Trigger t)
{
setShowWarnViewChanges(true)
}

bool isViewWarningOptionSet = getShowWarnViewChanges

if(isViewWarningOptionSet)
{
setShowWarnViewChanges(false)
Trigger t = trigger(module-> mFullName,
close,
10,
closeWithoutViewWarning)
}
Report this to a Moderator Report this to a Moderator
 24-Oct-2008 13:58
User is offline View Users Profile Print this message


Dennis Lockshine

Posts: 113
Joined: 7-Apr-2003

If DOORS is complaining about the view not being saved, well, then save the view. Then switch to the Standard View and delete the view you just saved. Then close the module and I bet the warnings will go away.

-Dennis
Report this to a Moderator Report this to a Moderator
 28-Oct-2008 12:28
User is offline View Users Profile Print this message


Simon Hillman

Posts: 7
Joined: 21-Apr-2006

That's not the point of what I'm trying to achieve. Other users will be using the utility I'm developing. I don't want them saving the view, as it's of no further use, and I don't want them getting prompted to save the view either, as it's not necessary, so I would prefer they don't see the prompt at all.

Have discovered another option. If with dxl you turn filtering off then 'accept' all those objects you wish to be displayed, and 'reject' all those you don't wish to be displayed. If you then turn filtering on and refresh the module, you should only see those objects that were 'accepted', and when the module is closed there is no 'Save the view' prompt.
e.g. This code will filter on the current object, and not prompt you to save the view (even though this client option is set), when the module is closed.

Module m = current
filtering off
Object currObj = current
Object o

for o in m do
{
reject o
}

accept currObj

filtering on
refresh m

Hope this helps anyone else with a similar issue.
Report this to a Moderator Report this to a Moderator
 28-Oct-2008 12:51
User is offline View Users Profile Print this message


Pekka Mäkinen

Posts: 276
Joined: 18-Mar-2004

The suggestion by Dennis seems to describe an algorithm how to sidestep this problem in DOORS. See attached code example.

-------------------------
Pekka.Makinen@softqa.fi
SoftQA Oy -http://www.softqa.fi/

Edited: 28-Oct-2008 at 13:15 by Pekka Mäkinen
Report this to a Moderator Report this to a Moderator
 28-Oct-2008 14:38
User is offline View Users Profile Print this message


Simon Hillman

Posts: 7
Joined: 21-Apr-2006

The problem with that, if my undestanding is correct, is that my user is then left with the 'Standard view' and not with the set of filtered objects I want them to see.

The solution described in my previous message, does what I want, so problem solved for me.

Thanks to all who helped.
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.