Indicate no-edit columns

I have numerous AttrDXL displayed in columns, summarizing this or linked objects, and folks are getting frustrated trying to edit these columns. I wonder how best to indicate that these columns (layout and attrDXL) are not editable.

Since all my AttrDXL names start with "dxl" (e.g. "dxlInterfaceSummary") and all layout code starts with "lo" (e.g. 'loInterfaceSummary.dxl", perhaps the column titles should reflect exactly the names, and folks can see "dxl" or "lo" and know not to edit it. This contrasts with normal attributes that all start with an uppercase letter.

Putting "NotEditable" in the column title falls apart for narrow columns since there is no room for the real title. Perhaps put " NotEditable" as the first line of each object's cell.

Any thoughts? Could perhaps I somehow shade these columns? Display a different font?

  • Louie

llandale - Wed Jun 02 14:17:21 EDT 2010

Re: Indicate no-edit columns
adevicq - Thu Jun 03 03:16:10 EDT 2010

Hi,

I've never used triggers, but is it possible to set a trigger that runs each time a view is opened ? If yes, why not set the background color of these columns (columns such as col.dxl is not empty) to a specific color that would mean "read only" ?

Alain

Re: Indicate no-edit columns
Mathias Mamsch - Thu Jun 03 03:33:26 EDT 2010

You could introduce a (hidden) attribute in your modules called "DXLColor" which is an enumeration attribute with a default value, that has grey color. In your views you can color the DXL attribute and DXL layout colums using this attribute, which will make the text appear in grey.

This should work with attributes and DXL layout - I see no other way of coloring attribute DXL.

Just a thought, Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Indicate no-edit columns
SystemAdmin - Thu Jun 03 07:01:33 EDT 2010

Mathias Mamsch - Thu Jun 03 03:33:26 EDT 2010
You could introduce a (hidden) attribute in your modules called "DXLColor" which is an enumeration attribute with a default value, that has grey color. In your views you can color the DXL attribute and DXL layout colums using this attribute, which will make the text appear in grey.

This should work with attributes and DXL layout - I see no other way of coloring attribute DXL.

Just a thought, Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

If you do a Word export to DOORS from a Word document which has Word higlights (colored background for text) the higlight will be left in DOORS. I copied the highlight RTF codes and applied it to a DXL attribute - it seems that a DXL attribute can at least display a colored backround for the text.

See attached demo (modified from DOORS DXL attribute library / Show number of modififications to object). The RTF codes are copied by using the "Display RTF codes" layout DXL from layout DXL library and have maybe some extra stuff, e.g. language codes (for Finnish?) and font codes.
 

// integer/string/text number of modifications
/*
Attribute DXL type : INTEGER, STRING or TEXT (autosensing)
*/
 
string GrayBackStart = "
{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\fo\\fnil\\fcharset0 Tahoma;}}
{\\colortbl;\\red128\\green128\\blue128;}
\\viewkind4\\uc1\\pard\\highlight1\\lang1035\\f0\\fs20 "
string GrayBackEnd = "\\highlight0\\lang1033\\par}"
 
int getMods(Object o) {
    History h
    int count = 0
    for h in o do {
    count++
    }
    return count
}
 
int val = getMods obj
 
Module m
AttrDef ad
AttrType at
 
m = module obj
ad = find(m,attrDXLName)
at = ad.type
if (at.type == attrInteger)
    obj.attrDXLName =  val
if ((at.type == attrString) || (at.type == attrText))
    obj.attrDXLName =  richText(GrayBackStart "Modifications: " val GrayBackEnd) ""

Re: Indicate no-edit columns
llandale - Thu Jun 03 18:24:48 EDT 2010

SystemAdmin - Thu Jun 03 07:01:33 EDT 2010

If you do a Word export to DOORS from a Word document which has Word higlights (colored background for text) the higlight will be left in DOORS. I copied the highlight RTF codes and applied it to a DXL attribute - it seems that a DXL attribute can at least display a colored backround for the text.

See attached demo (modified from DOORS DXL attribute library / Show number of modififications to object). The RTF codes are copied by using the "Display RTF codes" layout DXL from layout DXL library and have maybe some extra stuff, e.g. language codes (for Finnish?) and font codes.
 

// integer/string/text number of modifications
/*
Attribute DXL type : INTEGER, STRING or TEXT (autosensing)
*/
 
string GrayBackStart = "
{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\fo\\fnil\\fcharset0 Tahoma;}}
{\\colortbl;\\red128\\green128\\blue128;}
\\viewkind4\\uc1\\pard\\highlight1\\lang1035\\f0\\fs20 "
string GrayBackEnd = "\\highlight0\\lang1033\\par}"
 
int getMods(Object o) {
    History h
    int count = 0
    for h in o do {
    count++
    }
    return count
}
 
int val = getMods obj
 
Module m
AttrDef ad
AttrType at
 
m = module obj
ad = find(m,attrDXLName)
at = ad.type
if (at.type == attrInteger)
    obj.attrDXLName =  val
if ((at.type == attrString) || (at.type == attrText))
    obj.attrDXLName =  richText(GrayBackStart "Modifications: " val GrayBackEnd) ""

Clever solution.

You need to get rid of your leading EOL, after the double-quote for GrayBackStart. Stripping away what I could, I see the minimum coding that works is:

string GrayBackStart = "{\\rtf1{\\colortbl;\\red128\\green128\\blue128;}\\highlight1 "
string GrayBackEnd = "}"


And of course that only works when you are not displaying any of these 3 characters in the text: {}. If you are, those need to be escaped. Since the backslash is already escaped, printing a single back slash with highlighting would be 4 backslashes in a row.

I notice this doesn't gray out the cell, just the highlighting around the text itself, and it looks a little funny.

Thanks

 

 

  • Louie

 

 

Re: Indicate no-edit columns
llandale - Thu Jun 03 18:27:15 EDT 2010

Mathias Mamsch - Thu Jun 03 03:33:26 EDT 2010
You could introduce a (hidden) attribute in your modules called "DXLColor" which is an enumeration attribute with a default value, that has grey color. In your views you can color the DXL attribute and DXL layout colums using this attribute, which will make the text appear in grey.

This should work with attributes and DXL layout - I see no other way of coloring attribute DXL.

Just a thought, Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

I can live with creating some BS attribute and type for this purpose, in my case named 'z-Gray'.

Thanks, this will do well enough, until some clown defines a Color Scheme featuring the exact color Gray I'll use.

Thanks

  • Louie

Doh! Forgot to 'refresh DXL attributes' after making changes.