![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: DXL Best Practice Topic Summary: DXL for (not) Dummies Created On: 22-Oct-2008 13:48 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I'm sure we have all seen the dreaded DXL error when running our favourite scripts, but there are a few basics that can reduce the incidence of the script dying unexpectedly, thought I would share a few of my "things I always do" tips. No rocket science here but might make for an interesting thread. I find that most of my scripts can be built up from a few trusty basics:
* Following a link, don't assume that the target object still exists. Always assume there will be null or deleted objects: for thisLink in thisObject <- "*" do { thatObject = source thisLink if (null thatObject) {continue} if (isDeleted(thatObj)) {continue} //OK. now we should have a valid object { // do stuff } } * Sure, I'm fairly certain that my favourite attribute is distributed to all of my modules, but lets check first before we try to access that attribute, especially if we have followed a link: Module mod bool myAttributeExists = false AttrDef exists = find(mod, "myAttribute") if (!null exists) { myAttributeExists = true} if (myAttributeExists) { //do stuff with my attribute, i know it exists in this module } OK, im sure there are many more, but here are 2 to start with..... ------------------------- Andrew Tagg Thales Air Systems, Melbourne Australia. andrew.tagg@thalesatm.com |
|
![]() |
|
![]() |
|
Hi Andrew,
A good way to learn what exception handling is required when working with links via DXL is to use the "Analysis Wizard" to create a DXL Layout column. Once created you can view the DXL code which includes good examples of the major initialisation and exception handling routines that are needed when dealing with links. Also a great way for DXL newcomers to learn DXL and fiddle ariound with the code to see how it works. ------------------------- Paul Miller Specification Practices Specialist EuroCyber Melbourne, Australia Mobile: + 61 (0) 418 135 103 http://www.eurocyber.biz |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
DXL Best Practice
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.