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: setTriggerState question
Topic Summary:
Created On: 3-Jun-2008 15:01
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 David Pechacek, on Tuesday, June 3, 2008 4:18 PM

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.
 3-Jun-2008 15:01
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

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
Report this to a Moderator Report this to a Moderator
 3-Jun-2008 15:23
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 3-Jun-2008 16:18
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

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

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 4-Jun-2008 09:19
User is offline View Users Profile Print this message


Tony Goodman

Posts: 97
Joined: 6-May-2008

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
Report this to a Moderator Report this to a Moderator
 4-Jun-2008 13:12
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

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
Report this to a Moderator Report this to a Moderator
 5-Jun-2008 09:33
User is offline View Users Profile Print this message


Anders Vestlin

Posts: 11
Joined: 30-Aug-2007

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
}
}
Report this to a Moderator Report this to a Moderator
 11-Jun-2008 15:40
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.