![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Inhibit View Changes Warning Topic Summary: Created On: 7-Oct-2008 11:08 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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. |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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. |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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) } |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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. |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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. |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Inhibit View Changes Warning
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.