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: Altering Module Menu bar dynamically
Topic Summary: How can we activate and deactivate menu items on the fly?
Created On: 17-Oct-2008 00:27
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.
 17-Oct-2008 00:27
User is offline View Users Profile Print this message


jason haury

Posts: 39
Joined: 20-Feb-2007

Ultimately I'm trying to add a single item to the menu bar for the Module window, and I'd like to populate submenus and so on based on the User's group memberships. I've seen other threads on this, but I still have some questions:

1) If I add a basic menu set (set of sub menus and menu items) using the "folder" method (use createMenu() and pass it a folder structure rather than an individual DXL file) that are for all users, then wish to add in a few additional menu items using the "file" method (createMenu() that is passed a single DXL file), how can I do that? In other words, after a block of code has been run to create a menu, how can I go in to that menu to add or delete items?

2) Some native DOORS menu items are grayed out and reactivated depending on things like edit mode (say, "Lock Section" depends on being in Sharable Edit mode). How is this done? I'd like to gray out some my custom tools and even some native DOORS tools and I'm not sure how.

What I've learned so far is that to modify native DOORS menus, I have to modify formal.dxl (\lib\dxl\config). I also see how I can add menu items by setting up a set of callback "mapping functions" in lib\dxl\startupFiles and then putting other files that set up the menus in \lib\dxl\config\formalFiles. What other tricks are there? How does telelogic pull it off to change menu item status dynamically?

Thanks
Jason
Report this to a Moderator Report this to a Moderator
 17-Oct-2008 10:55
User is offline View Users Profile Print this message


Paul Tiplady

Posts: 176
Joined: 28-Oct-2003

I think the trick is to create all the menu items, then grey out the inappropriate ones. I've done this for menu items that should only be run from particular modules using the attached code.

Note that the first function (ProjectActive) lives in a *.dxl file in the "config/baseWindowCallbackFiles" folder, and the other function and its call live in a *.inc file in folder "config/baseWindowMenuFiles".

Maybe that will help you...

Paul

-------------------------


Paul dot Tiplady at TRW dot com
TRW Automotive
Report this to a Moderator Report this to a Moderator
 31-Oct-2008 20:53
User is offline View Users Profile Print this message


jason haury

Posts: 39
Joined: 20-Feb-2007

Thanks! After seeing your post, and talking to some folks at the Telelogic Innovation 2008 conference, it seems like Module menus can only be updated (add, remove, gray out, un-gray out, etc) when the Module open state is changed (opened initially, changed from read only to edit, etc). The implication is that a DXL script couldn't be written to, say, change menu items real time. For example, if I wrote a GUI with a checklist of menu items for the user to select which menu items he'd like to see, after he made his choices, there would be no way to apply those choices without changing the module edit state. (or closes then re-opens the module)

This raises the question: some trigger must be watching for module edit mode changes and then calling some menu re-draw function every time it's triggered. Does anyone know what that redraw function is? If so, then scripts could be written to change menu items real time.
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.