DOORS DXL Function Execution

I am very new to Doors ( and programming in general) so please understand if my comments/questions are ignorant. Using DXL I made a window with check boxes and the user then selects which of the selected Attribute/Type DXL's to execute. My problem is that once the program executes the first selected item it does not return back to where it left off and execute the next function. I am not sure under what category my problem falls under. Ive been looking up function execution in the DXL reference manual and such but I am stuck. I have attached the program I have written.

Any comments/ help would be appreciated. Thanks for your time.
jmina - Tue May 24 15:03:26 EDT 2011

Re: DOORS DXL Function Execution
llandale - Wed May 25 14:57:23 EDT 2011

First off, here's the standard structure for scripts that have dialog boxes.

Global Variable Declarations DB dialog declarations DBE element declarations various functions callback functions specified on dialog box define DB and DBEs show(DB().

Since your callback functions almost always need to address specific Elements and often the Dialog, those variables need to be defined above the callbacks. Might as well just declare them all at the top. Its real bad Karma to scatter your dialog stuff all over.

As for your code. OK, user hits "OK" on dialog and you execute function "execute()". Depending on what was selected, if anything, then your various included functions are called. After that, "execute()" ends and therefore so does your DXL thread, leaving your dialog box up for either another OK or a Close.

I think you are saying that when the user selects the first two check boxes and then hits OK, you expect function executeSupportedAttrEnums() to be called (i=0), and then function executeQueryAttrType() (i=1). Sounds reasonable and it should indeed work.

I wonder if perhaps your library functions have a "halt" at the end of them. I wonder if your use of variable "bitmap" is messing things up, since that some sort of key ..err.. special word; try changing its spelling. I wonder about your "loopi" loop being inside the original "i" loop; think it should be moved down a couple lines.

I assume your bitmap logic is correct and boxeschecked[] gets set appropriately.

The flow looks good; no nested loops using the same variable or anything like that.

When I run the code (commenting out the #include statements and the 6 function calls) and select the 1st two check boxes, I get the right results:
0 execution statement, i= 0
1 execution statement, i= 1

So I presume there is indeed a "halt" in those functions. Easy to prove, comment them out.

If you cannot edit those functions you can code around the halt (that is, cause a "halt" in those functions to be ignored), but I'll leave that for a future post ... because someone who does it better will jump in here and beat me to it.

  • Louie