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: Anyone tried the AutoRun or Button Bar?
Topic Summary:
Created On: 6-Nov-2004 00:44
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 Tuesday, November 9, 2004 5:19 PM

Answer:
The error message is spurious.

You cannot define the mapping function in this file, or include a file that contains it.

The menus are "built" once when you start DOORS.
But the mapping functions are executed when required (i.e. the menu option is displayed), so the mapping function needs to be available.

Declare your mapping functions in the top context by inclusion in startup dxl for example.
 6-Nov-2004 00:44
User is offline View Users Profile Print this message


Shawn Stepper

Posts: 96
Joined: 6-Aug-2004

I am trying to do two things and I'm not sure which one is failing. I put a dxl file in \lib\dxl\config\formalFiles. The file is executed, and it displays a new toolbar, but I constantly get this error:

-R-E- DXL: incorrect return statement
Backtrace:

-R-E- DXL: incorrect return statement

I am assuming I am either incorrectly creating a button, or I need to return some value at the end of my dxl script. I tried returning several values, to no avail. My script is attached.

I couldn't find ANY documentation relating to the auto execution of files.

-------------------------
Shawn Stepper
shawn.e.stepper@wellsfargo.com
Report this to a Moderator Report this to a Moderator
 8-Nov-2004 13:28
User is offline View Users Profile Print this message


Antonio Norkus

Posts: 109
Joined: 28-Jun-2003

Hi Shawn,

in looking into your request for exec type functionality, I decided to knock up an example of adding a buttonbar to a dialog box.

However, I get the same problem as you are seeing, with an incorrect return error. I have contacted Telelogic support regarding this and am awaiting their answer.

Here's the example I created. When the "hello" dialog is closed, the error is reported:

DB dlg = centered "Example BB"
startConfiguringMenus dlg
createButtonBar
createItem(menuAvailable_, null, null, null, null, folderOpenIcon, null, null, null, "C:\\hello.dxl")
end buttonbar
show dlg

the contents of hello.dxl is

DB hello = centered "hello"
block hello
Report this to a Moderator Report this to a Moderator
 8-Nov-2004 16:43
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Answer Answer
The error message is spurious.

You cannot define the mapping function in this file, or include a file that contains it.

The menus are "built" once when you start DOORS.
But the mapping functions are executed when required (i.e. the menu option is displayed), so the mapping function needs to be available.

Declare your mapping functions in the top context by inclusion in startup dxl for example.


-------------------------
Tony Goodman
http://www.smartdxl.com

Edited: 8-Nov-2004 at 16:59 by Tony Goodman
Report this to a Moderator Report this to a Moderator
 17-Nov-2004 16:40
User is offline View Users Profile Print this message


Antonio Norkus

Posts: 109
Joined: 28-Jun-2003

Here's the fixed example of using a button bar in a user dialog box. Rather than specify a new mapping function, it uses the Telelogic defined "alwaysOn" mapping function, so the startup.dxl doesn't need updating.

Just a shame that the button bar can only use pre-defined icons. :-(
-----------------------
DB dlg = centered "Example BB"
startConfiguringMenus dlg
createButtonBar
createItem(alwaysOn, null, null, null, null, folderOpenIcon, null, null, null, "C:\\hello.dxl")
end buttonbar
show dlg

the contents of hello.dxl is

DB hello = centered "hello"
block hello
Report this to a Moderator Report this to a Moderator
 3-Dec-2004 19:19
User is offline View Users Profile Print this message


Shawn Stepper

Posts: 96
Joined: 6-Aug-2004

Defining the callback function in a dxl file in the "startupFiles" folder allows use of the button bar. But the problem with it is that the function scope is global, instead of per module. I want to have functions that are scoped for the module, when the module is opened.

For example, if I define an integer in the startupFiles script, and increment it each time my button is clicked in a formal module, the variable value is the same across modules.

Anyone know how to scope the variables and functions to the module? Can it be done by overloading the functions?

-------------------------
Shawn Stepper
shawn.e.stepper@wellsfargo.com
Report this to a Moderator Report this to a Moderator
 6-Dec-2004 09:51
User is offline View Users Profile Print this message


Ross Morgan

Posts: 74
Joined: 15-Apr-2004

overloading isn't an option.

I would suggest creating skiplists in the global context with a module identifier as the index.
Report this to a Moderator Report this to a Moderator
 6-Dec-2004 17:32
User is offline View Users Profile Print this message


Shawn Stepper

Posts: 96
Joined: 6-Aug-2004

I was hoping to avoid that, but I guess it wouldn't be too much more complicated. Probably a skip list where the key is the module id and the value is another skip list.

Thanks for the advice!

-------------------------
Shawn Stepper
shawn.e.stepper@wellsfargo.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.