![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: setTriggerState question Topic Summary: Created On: 3-Jun-2008 15:01 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Well I was using it because I wanted a trigger to close a dialog box when the module was closed. But the problem was, the script also can change edit modes (read->edit/share) which closes the module and reopens it. So I was trying to disable that trigger. It works on my machine. But not on others. I have subsequently just removed that trigger. | |
![]() |
|
What are the restrictions for this? I have a tool that uses a trigger to close the dialog when the module is closed, but I need to stop it from working temporarily at certain points. Everything works fine on my machine but others have issues.
Are only database managers able to use this command successfully? ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
Search for 'TriggerState' in the forums to see a script I wrote for enabling and disabling the running of triggers. The script 'works' for all users (that is, the setTriggerState_ works), but if you are not a DB admin (..err.. have not DB manage powers) then triggers are going to run even when disabled by setTriggerState_.
setTriggerState_ can be used to enable triggers that were originally turned off via the "noTriggers" command line switch. - Louie Edited: 3-Jun-2008 at 15:26 by Louie Landale |
|
![]() |
|
![]() |
|
Well I was using it because I wanted a trigger to close a dialog box when the module was closed. But the problem was, the script also can change edit modes (read->edit/share) which closes the module and reopens it. So I was trying to disable that trigger. It works on my machine. But not on others. I have subsequently just removed that trigger.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
I always use a dynamic trigger to close non-blocking dialogs when the module is closed.
This is important because you can cause run-time errors if the module is closed by the user and then the dialog tries to do something using the defunct module handle. David, I can't think of any solution that gets round this without being annoying to the user :-( ------------------------- Tony Goodman Smart DXL limited www.smartdxl.com |
|
![]() |
|
![]() |
|
Yeah thats what I did. But when I went from read to edit mode, that trigger fires because DOORS closes the module to change to edit. So the references to the dialog box became null and I got errors. I'm just going to have to trust that people are smart enough to close the dialog box before closing the module, or at least not try to use the dialog box after the module is closed.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
If you are using a post close trigger you can check for a module handle for the trigger. If the handle is not null the module still is open and you dont need to close the dialog.
void triggerClose(Trigger t) { Module m = module(t) if ( null(m) ) { //Close GUI } } |
|
![]() |
|
![]() |
|
David,
I had a similar issue a while back. I have trigger that fires when a module closes, but I didn't want it to fire when I closed the module via a DXL script (or downgraded the module). What I did is created a global boolean variable that gets initiated at client startup. Something like: bool disableTrigger = false Then before closing a module in the script, I set it the variable to true close the module and then set it back to false: disableTrigger = true close (m) disableTrigger = false In the trigger script I check the variable before carrying out any actions, if its set to true the trigger doesn't do anything, if set to false, then we execute the trigger script. I drop my include file with the global variable in the config\baseWindowCallbackFiles directory. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
setTriggerState question
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.