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: Issue with treeView
Topic Summary:
Created On: 22-Jul-2008 20:58
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 Wednesday, July 23, 2008 12:51 PM

Answer:
I figured it out. I was using the functions for adding menus on the main DOORS dialog boxes. I didn't realize you had to use the addMenu command for custom ones.

Line 243 was just the call to show the dialog box.
 22-Jul-2008 20:58
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

I am working on a script involving a treeView. I want items in the treeView to do something when double clicked so I have:

set(treeView_DBE, itemSelected, itemActivated);

It works fine with this. But now I also want to add in a File menu with an Exit option as well as some other options. So right now I have:

startConfiguringMenus(treeView_DBE);
createMenu(mappingFunction(), "File", 'F', null);
createItem(mappingFunction(), fileExitCloseCallback(), "Exit", 'E', null, modKeyCtrl, null, null, "Close the window.", "Will never see this.");
end(menu);
stopConfiguringMenus(treeView_DBE);

The mappingFunction returns 'alwaysOn'. The fileExitCloseCallback is a void function that calls the main close dialog box function.

The program works fine with just the first command. Adding in the menu stuff gives me this error.

-R-E- DXL: <H:\\DXL Scripts\\treeViewProgram.inc:219> Dialog box element does not support double-click callbacks
Backtrace:
<H:\\DXL Scripts\\treeViewProgram.inc:243>
-I- DXL: execution halted


Line 219 is the set(treeView_DBE, itemSelected, itemActivated); line.

Whats going on? I've tried moving the line before and after the menu code. I've tried wrapping this code in {} as they do in treeview.dxl in the examples directory.

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

Edited: 22-Jul-2008 at 20:59 by David Pechacek
Report this to a Moderator Report this to a Moderator
 23-Jul-2008 02:59
User is offline View Users Profile Print this message


David Jakad

Posts: 94
Joined: 20-Jul-2007

I'd be curious to know what is on line 243. It shows in the backtrace. This would lead me to believe that line 219, set(treeView_DBE, itemSelected, itemActivated), is within some sort of function.

I always have challenges adding menus. It always seems harder than it should be. I could be mistaken, but you may have to put the menu configuration code after realize(DB) and before show(DB), or in a callback that doesn't get called until after the DB is realized/shown. Also, I know you can add the same right-click menu for the treeView using the addMenu function instead of the startConfigurationMenu commands. The addMenu command can go before realize(DB).

Give us some more hints.
Report this to a Moderator Report this to a Moderator
 23-Jul-2008 12:51
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Answer Answer
I figured it out. I was using the functions for adding menus on the main DOORS dialog boxes. I didn't realize you had to use the addMenu command for custom ones.

Line 243 was just the call to show the dialog box.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
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.