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: Building a GUI, ambiguous documentation for addMenu
Topic Summary:
Created On: 6-Sep-2002 11:02
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 Tony Goodman, on Thursday, September 12, 2002 11:06 AM

Answer:
You are using string arrays instead of char arrays for the mnemonics etc. I have fixed the code and attached it. Don't forget to use single quotes for chars
 12-Sep-2002 11:02
User is offline View Users Profile Print this message


Sean Aitken

Posts: 4
Joined: 12-Sep-2002

Hello all!

I am feverishly trying to ramp up on DXL. Can someone tell me why the following code is producing an error (shown at bottom):

// Declare dialog box and elements (controls)
DB objXpertDialog = create("TestXpert Integration", styleCentered);
DBE objMenuBar = menuBar(objXpertDialog); // Menubar for holding menu items

const string strMenuOptions[] = {"Close","---","About..."};
const string strMenuMnemonics[] = {"C",ddbNone,"A"};
const string strMenuHots[] = {ddbNone,ddbNone,ddbNone};
const string strMenuHelp[] = {"","",""};
const string strMenuInacHelp[] = {"","",""};

addMenu(objMenuBar, "TestXpert", "T", strMenuOptions, strMenuMnemonics, strMenuHots, strMenuHelp, strMenuInacHelp,
isItemSensitive, menuItemSelected);

setSize(objXpertDialog, 400, 400);

// Shows dialog in batch mode, or GUI mode
baseWin(objXpertDialog);


--
The error is:
-E- DXL: incorrect use of identifier (ddbNone)
-E- DXL: incorrect arguments for function (addMenu)
-E- DXL: undeclared variable (menuItemSelected)
-E- DXL: undeclared variable (isItemSensitive)
-I- DXL: all done with 4 errors and 0 warnings
Press return to exit DOORS.

--
The documentation indicates the use of the constant, ddbNone, if I want no value for mnemonics or 'hots'. THe error indicates thats a bad idea. Any help would be appreciated.

Also, the setSize method doesn't seem to have an affect on the window size.. (after clearing the erroring menu code, of course) What gives?

-Sean-
Report this to a Moderator Report this to a Moderator
 12-Sep-2002 11:04
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Answer Answer
You are using string arrays instead of char arrays for the mnemonics etc. I have fixed the code and attached it. Don't forget to use single quotes for chars

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 12-Sep-2002 11:06
User is offline View Users Profile Print this message


Sean Aitken

Posts: 4
Joined: 12-Sep-2002

Excellent.. works great. Now, if I can figure out why the setSize function isn't working...

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