![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: DXL error after starting script for adding a trigger Topic Summary: How can I stop DXL executing? Created On: 16-Jan-2008 16:47 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Louie, you are great. ![]() ![]() I found the missing end-paren It works fine now. It turns out that I have to think twice before I deploy a script that starts with: "This programming tool has been thoroughly checked and tested at all stages of its production." Kind regards, Elbert Mol | |
![]() |
|
Sometime you try a step too far....
In this case I started a script in the kitchen for "Attribute Summary trigger" and to mess it up completely also "set up email trigger" and "trigger to display the module Unique ID in the status bar" I thought to be safe to try this in a test project. Although I started the script "remove all triggers in project" which responsed that all trigggers were deleted I still have serious problems in all projects and on all clients. When I select an object immediately a DXL error appears. The error text in the DXL window is: E- DXL: <Line:2> syntax error -E- DXL: <Line:1> incorrectly concatenated tokens -I- DXL: all done with 2 errors and 0 warnings At the same time the object is marked for linking. Anybody a clue how to stop DXL? or to solve the problem? Thank you! |
|
![]() |
|
![]() |
|
Search for 'TriggerState' in the DXL forums for a simple script I wrote to turn triggers on and off for the current user; who must be a DB admin for the triggers to get disabled.
Use the attached 'DxlFind.dxl' code on your module to find DXL scripts (triggers, attrDXL, layouts) that may be effecting your module - Louie |
|
![]() |
|
![]() |
|
Louie, thanks for quick responding.
I ran your script. (* on a client, not as Admin*) Unfortunately the problem still exist. The results of running the script is as follows: >>>>>>>>>>> Results Follow <<<<<<<<<<<<<< >>>>>>>>AttrDXL: none found >>>>>>>>LayoutDXL: in view: '99. Baseline Delta Config View' Column: 'Compare to 7.0 Object Text' pragma runLim,0 const int TOKSIZE = 4 // number of digits to use to count tokens const int BOLD = 1 const int ITAL = 2 const int UNDL = 4 const int STRK = 8 const int RED = 16 const int GREEN = 32 const int BLUE = 64 const int nAttributesToCompare = 2 string sAttributesToCompare[] = {"Object Text","Object Heading"} /////////////////////////////////////////////////////////// // Main function Buffer deltaText(Buffer oldText, newText, int oldFont, newFont) { string deleteMarkup = " " if ( oldFont&RED != 0 ) deleteMarkup = "\\cf1" deleteMarkup if ( oldFont&GREEN != 0 ) deleteMarkup = "\\cf2" deleteMarkup if ( oldFont&BLUE != 0 ) deleteMarkup = "\\cf3" deleteMarkup if ( oldFont&BOLD != 0 ) deleteMarkup = "\\b" deleteMarkup if ( oldFont&ITAL != 0 ) deleteMarkup = "\\i" deleteMarkup if ( oldFont&UNDL != 0 ) deleteMarkup = "\\ul" deleteMarkup if ( oldFont&STRK != 0 ) deleteMarkup = "\\strike" deleteMarkup string insertMarkup = " " if ( newFont&RED != 0 ) insertMarkup = "\\cf1" insertMarkup if ( newFont&GREEN != 0 ) insertMarkup = "\\cf2" insertMarkup if ( newFont&BLUE != 0 ) insertMarkup = "\\cf3" insertMarkup if ( newFont&BOLD != 0 ) insertMarkup = "\\b" insertMarkup if ( newFont&ITAL != 0 ) insertMarkup = "\\i" insertMarkup if ( newFont&UNDL != 0 ) insertMarkup = "\\ul" insertMarkup if ( newFont&STRK != 0 ) insertMarkup = "\\strike" insertMarkup Buffer resText = create() string errmsg = diff(resText, oldText, newText, deleteMarkup, insertMarkup) if ( !null errmsg ) { print "deltaText: " errmsg "\n" return null } return resText } string deltaText(Buffer oldText, newText, int oldFont, newFont) { Buffer b = deltaText( oldText, newText, oldFont, newFont) string s = stringOf(b) delete(b) return s } Baseline b = baseline (7,0,"") Module mBasVer = load (b,false) int i = obj."Absolute number" Object oBas = object(i,mBasVer) if (null oBas) { display "Object does not exist in baseline" halt } Buffer bsz = create() AttrDef ad string sAttribute for i in 0:nAttributesToCompare-1 do { sAttribute = sAttributesToCompare Buffer o = create() o = probeAttr_(oBas, sAttribute) Buffer n = create() n = probeAttr_(obj,sAttribute) if ( length(o) > 10000 || length(n) > 10000 ) { bsz += sAttribute ":" "{\\i (Text too big to compare.)}" } else if (o!=n) { bsz += "{\\b " sAttribute ":}\n" deltaText(o, n, 25, 69) "\n\n\n" } delete(o) delete(n) } displayRichWithColour stringOf(bsz) delete (bsz) >>>>>>>>TriggerDXL-Mod: none found >>>>>>>>TriggerDXL-Prj: none found >>>>>>>>TriggerDXL-Database 'modid': FoundIn 'Database' post-sync-object: Trigger t = current ; Object o = object(t) ; if ( isVisible(module(o) ) status(module(o), uniqueID(item(fullName(module(o))))) ********* When the script stopped I selected an object in the module and an error appeared. In the DXL window the following message appeared. -E- DXL: <Line:2> syntax error -E- DXL: <Line:1> incorrectly concatenated tokens -I- DXL: all done with 2 errors and 0 warnings -E- DXL: <Line:2> syntax error -E- DXL: <Line:1> incorrectly concatenated tokens -I- DXL: all done with 2 errors and 0 warnings -E- DXL: <Line:2> syntax error -E- DXL: <Line:1> incorrectly concatenated tokens -I- DXL: all done with 2 errors and 0 warnings The problem eists in all modules of different projects so it seems to be on database level. Your script, see the end of the report, found a trigger on db level. Could that be the nasty one? if so how can I get rid of it? Thanks for your assistance! Tomorrow I will run your Triggerstate script on the DB client. See if I can switch of the current DB trigger. In the triggerstate explanation you mention that the trigger only will be disabled for the current doors session. Will I be able to delete the DB trigger? Edited: 16-Jan-2008 at 20:45 by Elbert Mol |
|
![]() |
|
![]() |
|
Don't know why you are getting multiple errors, but the real error is in that trigger 'modid' code: there is a missing end-paren in the if statement, after the 'module(o)':
if (isVisible(module(o))) status(....etc). Find the code that deploys that database wide trigger, and fix it. TriggerState doesn't disable triggers nor does it delete them. It simply stops them from running for the current DOORS session. That is, they don't fire for you. The attached may delete database wide triggers. - Louie BTW: Trigger deploy scripts should be able to deploy and delete the trigger; and thus could look like the following: string NameTrig = "MyTriggerName" string TrigCode = readFile("c:/MyDxl/MyTriggerName_Dxl.dxl") if (confirm("Deploy Trigger '" NameTrig "' ??") { trg = trigger(NameTrig, abcTriggerParameters, TrigCode) if (null trg) infoBox(NameTrig " didn't seem to get deployed") } if (confirm("Remove Trigger '" NameTrig "' ???")) { delete(NameTrig, abcTriggerParameters) } Edited: 16-Jan-2008 at 21:13 by Louie Landale |
|
![]() |
|
![]() |
|
Louie,
you are great. ![]() ![]() I found the missing end-paren It works fine now. It turns out that I have to think twice before I deploy a script that starts with: "This programming tool has been thoroughly checked and tested at all stages of its production." Kind regards, Elbert Mol |
|
![]() |
|
![]() |
|
"This programming tool has been thoroughly checked and tested at all stages of its production." After that you will read "Telelogic cannot accept any responsibility for any loss, disruption or damage to your data or your computer system that may occur while using this script." :-o Don't you just love it! ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Trigger deploy scripts should routinely issue 'checkDXL' command on the proposed code to be deployed; at least that lets you not deploy code that won't even interpret. Doh!, my example above failed to do that.
- Louie |
|
![]() |
|
![]() |
|
That would be wise indeed.
However, the DXL manual gives not enough info for me. ![]() I can manipulate the example so it will be error free. I would appreciate to see how it must be set up for more complex code p.e. the sort function example in the DXL manual. Regards, Elbert |
|
![]() |
|
![]() |
|
I posted a rather long post about how to write Trigger deploy DXL. Long DXL could perhaps be coded into a separate file and put in the deploy code via the readFile() command. Mid-size DXL can simply be coded into a string variable, something like this:
string DxlCode = " Module mCurr = current string NameMod = name(mCurr) if (NameMod == \"MySensitiveModule\") { infoBox(\"Be careful editing this Module\") } " // end definition of variable 'DxlCode' string ErrMess = checkDXL(DxlCode) if (!null ErrMess) print DxlCode "\n\n" ErrMess else {deploy dxl...} - Louie |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.