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: Attribute trigger - get current Module
Topic Summary:
Created On: 14-Sep-2004 14:30
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 Louie Landale, on Thursday, September 23, 2004 11:43 AM

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
 14-Sep-2004 14:30
User is offline View Users Profile Print this message


Asaf Kivity

Posts: 54
Joined: 25-Mar-2003

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
Report this to a Moderator Report this to a Moderator
 14-Sep-2004 16:07
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

"Module mCurr = current"
Doesn't do it?
Report this to a Moderator Report this to a Moderator
 16-Sep-2004 12:14
User is offline View Users Profile Print this message


Asaf Kivity

Posts: 54
Joined: 25-Mar-2003

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.
Report this to a Moderator Report this to a Moderator
 17-Sep-2004 16:18
User is offline View Users Profile Print this message


Frank Held

Posts: 14
Joined: 16-Jul-2004

Trigger can modify the current() settings. it's better to us

Trigger trg = current()
Object o = object(trg)
Module m = module(o)

-------------------------
Frank
Report this to a Moderator Report this to a Moderator
 19-Sep-2004 09:29
User is offline View Users Profile Print this message


Yoram Bechler

Posts: 2
Joined: 23-Jan-2003

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
Report this to a Moderator Report this to a Moderator
 21-Sep-2004 23:22
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 22-Sep-2004 10:25
User is offline View Users Profile Print this message


Asaf Kivity

Posts: 54
Joined: 25-Mar-2003

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.
Report this to a Moderator Report this to a Moderator
 22-Sep-2004 17:11
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Answer 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
Report this to a Moderator Report this to a Moderator
 23-Sep-2004 11:43
User is offline View Users Profile Print this message


Asaf Kivity

Posts: 54
Joined: 25-Mar-2003

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.
Report this to a Moderator Report this to a Moderator
 23-Sep-2004 12:35
User is offline View Users Profile Print this message


Ross Morgan

Posts: 74
Joined: 15-Apr-2004

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.
Report this to a Moderator Report this to a Moderator
 23-Sep-2004 16:01
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 24-Sep-2004 09:03
User is offline View Users Profile Print this message


Ross Morgan

Posts: 74
Joined: 15-Apr-2004

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