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: Problem modifying createFormalPopupMenu
Topic Summary: in \lib\dxl\config\formal.dxl
Created On: 7-Sep-2007 20:14
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.
 7-Sep-2007 20:14
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

I'm trying to add a menu item to the popup menu when you right click on an object. I'm getting stack underflow errors for some reason. Here is the code I've added.

Any ideas?

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 10-Sep-2007 07:18
User is offline View Users Profile Print this message


Uma Unnikrishnan

Posts: 32
Joined: 7-Aug-2006

Hello David,

    Replace \\\\C17es\\C-17 (2070)\\TRM\\RTM\\DXL Scripts\\MTD Editor-e.inc with a function as follows wherein the function will be referring to the inc:

createItem(showWindowEditor,
                       "test",
                       "Editor Window",
                       'w',
                       'W',
                       modKeyCtrl,
                       null,
                       null,
                       "Opens a window to modify the current object",
                       "Must be in shared or exclusive edit mode")

This should take care of the problem

rgds,
Uma
Report this to a Moderator Report this to a Moderator
 10-Sep-2007 13:55
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

The only problem is I don't want it as a global include since it only applies to specific modules. There are a lot of data structures in the script that I don't want created any time a module is opened.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 10-Sep-2007 14:34
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi David,

it seems that you have mixed up the two (three) type of createItem functions

If you want to run a script file on menu item you need to use:

void createItem(int mappingFunction(),
string label,
char mnemonic,
char accelerator,
int modifierKeyFlags,
IconID icon_id,
string tooltip,
string helptext,
string inactiveHelp,
string dxlFile)

so your example becomes:
createItem(showWindowEditor,
"Editor Window",
'w',
'W',
modKeyCtrl,
null,
null,
"Opens a window to modify the current object",
"Must be in shared or exclusive edit mode",
"\\\\C17es\\C-17 (2070)\\TRM\\RTM\\DXL Scripts\\MTD Editor-e.inc")

Hope that solves your problems,
Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 10-Sep-2007 16:09
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

I tried that one Reik, it didn't give any errors but when I right click and selected the item, the script didn't run. Nothing happened.

EDIT: Nevermind. Apparently nothing will happen unless its a dxl file. So I made a dxl file that includes my include and it worked.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com

Edited: 10-Sep-2007 at 16:18 by David Pechacek
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.