// Overload the text(Column col, Object obj) routine when 'col' contains layout DXL /* Using text(col,obj) in a layout DXL column fails, if 'col' itself also contains layout DXL. The respective layout DXL (the one with the call to 'text') just stops. Here is the workaround: Get the respective DXL code Define 'obj' Run the respective DXL code using 'eval_' The original idea and the clever 'addr_' trick were posted by Mathias Mamsch in the IBM Rational DOORS DXL Forum, I just changed it to an overloaded routine Peter Albert */ // ============================================================================= string textOrig(Column col, Object obj){string s = text(col, obj); return s} // ============================================================================= Buffer gbColumnValue = create() string prefCode; string lineSep = "\n" prefCode = " Buffer bres = addr_ " ((addr_ gbColumnValue ) int) "\n setempty bres void displayRich (string x) {if (length bres > 0){bres += \"" lineSep "\"}; bres += x} void display (string x) {if (length bres > 0){bres += \"" lineSep "\"}; bres += x} void display (Attr__ x) {Buffer c = create(); c = x; if (length bres > 0){bres += \"" lineSep "\"}; bres += c; delete c;} void displayRichWithColour (string x) {if (length bres > 0){bres += \"" lineSep "\"}; bres += x} void displayRichWithColor (string x) {if (length bres > 0){bres += \"" lineSep "\"}; bres += x} " string text(Column col, Object obj) { string returnValue = "" gbColumnValue = "" if (!main col && attrName col == "" ) { Buffer code = create() code += "Object obj = addr_ " ((addr_ obj) int) "\n" code += "attrDXLName = \"" attrDXLName "\"\n" code += prefCode; code += dxl col; code += "\n" noError() (current ModuleRef__) = module obj eval_ tempStringOf code string errMsg = lastError() delete code } else if (attrName col != "") { gbColumnValue = probeAttr_ (obj, attrName col) } else if (main col) { Buffer oh = create() oh = obj."Object Heading" Buffer ot = create() ot = obj."Object Text" gbColumnValue = "" gbColumnValue += oh if (length gbColumnValue > 0){gbColumnValue += "\n"} gbColumnValue += ot delete oh delete ot } return stringOf gbColumnValue } return stringOf gbColumnValue