![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Attribute trigger - get current Module Topic Summary: Created On: 14-Sep-2004 14:30 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: The edit mode menu makes use of the Telelogic written "setExclusive()" function that I've proven does NOT work the same way as the DXL mod = edit(name, false) function. Sent to Telelogic the demonstration and am sure they ignored it. Don't know all the particulars but this command (along with "setShareable()") do something bad to the DXL environment. Don't know what to tell you other than don't use that pull-down, or better yet write your own "SwitchOpenMode.dxl" program. - Louie | |
![]() |
|
We came to a problem with this trigger:
Trigger t108 = trigger("MO Decision",module -> currModName->attribute->"MO Decision", post, modify, 95, "#include <nice/include/clear_decisions.inc>") The file clear_decisions.inc doesn't know which module is the current, which he should because we use it. Any clue of how to do that ? the "stored" function did not help, because it returns only the name (and not the fullName) and module (Trigger t) did not return anything. Your help will be appreciated Asaf Kivity |
|
![]() |
|
![]() |
|
"Module mCurr = current"
Doesn't do it? |
|
![]() |
|
![]() |
|
No, Actually it doesn't. i was surprised by that also. The only thing i get to work is the "stored" function, but this only gives a string name for the module, without the complete path.
|
|
![]() |
|
![]() |
|
Trigger can modify the current() settings. it's better to us
Trigger trg = current() Object o = object(trg) Module m = module(o) ------------------------- Frank |
|
![]() |
|
![]() |
|
Some backgroud to the problem.
When we use this trigger upon module open (exclusive) it does the work correctly. If we try to open the module in shareable edit, than from the module itself Edit -> Exclusive, we get an error related to the problem that it does not know which is the current module. We tried the object (trigger) and than to get the module (object) and it didn't help also. did any of you had this problem in the past? Yoram. Edited: 19-Sep-2004 at 09:29 by Yoram Bechler |
|
![]() |
|
![]() |
|
I use Module mCurr = current in my triggers without trouble. Maybe you should send the code.
the stored function isn't very useful. I found some wiered algorithm to figure out where the triggers were stored. The object(trig) returns the object to which the trigger applies (for object open or sync triggers). For these attribute triggers I just use Object oCurr = current to figure out which one is being modified; but that only works for manual modifications. Are you running your trigger code from the module in question, or is the DXL running from the Explorer? - Louie |
|
![]() |
|
![]() |
|
I will try to post the code here by the end of this week.
As mentioned above, the problem only happens when switching from shareable edit mode to exclusive edit mode. We run the trigger from within DOORS in the normal way (from the menu). Thanks, Asaf. |
|
![]() |
|
![]() |
|
The edit mode menu makes use of the Telelogic written "setExclusive()" function that I've proven does NOT work the same way as the DXL mod = edit(name, false) function. Sent to Telelogic the demonstration and am sure they ignored it. Don't know all the particulars but this command (along with "setShareable()") do something bad to the DXL environment.
Don't know what to tell you other than don't use that pull-down, or better yet write your own "SwitchOpenMode.dxl" program. - Louie |
|
![]() |
|
![]() |
|
Ahha.
This is very interesting. it answers few of my other questions. Thank you for that. I have managed to workaround it with a simple if that skips a check which caused the errors. Thanks. Asaf. |
|
![]() |
|
![]() |
|
edit() doesn't change the module to "exclusive edit" if you are in "edit shareable" mode
so setExclusive does something like this... inplaceEditOff(m,true) downgrade(m) edit(fullName(m),true) ..if that helps. |
|
![]() |
|
![]() |
|
Yes, must downgrade (effectively means open read), then edit it (which officially "opens" it again, in case you've got some module open triggers).
NitPick: use bool IsVis = isVisible(mod), then use IsVis instead of "true" in the other calls (don't open it Visible if its currently invisible). What's this "inplaceEdit" thing all about? - Louie |
|
![]() |
|
![]() |
|
inplaceEditOff is a clean way of turning off inplace editing for the module
-finishes inplace editing and validates changes -shuts down activated OLE objects and keeps changes -avoids some odd scrolling race conditions which can happen it returns a bool. If it returns false, you don't really want to continue with downgrade() and edit() because it probably means you are in the middle of an edit and what you've entered is invalid for the attribute. e.g a badly formatted date string. |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Attribute trigger - get current Module
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.