////////////////////////////////////////////////////////////////// // GML CONTORLS RULES #ALIAS[g=core.svg:GmlDrawing] #INCLUDE[gml:defs.inc] Configure RULES var category = 'Fields'; $ENV.defineRule({ id:'getFieldColumns', category:category, description:'Gets the field columns that will be displayed in the Fields editor dialog', parameters:'gml:Unit unit!,gml:Element element!, env:GRID_DEF[] columns', restrictive:true }); $ENV.extendRule('getFieldColumns', { constraint:'element isa gml:Configurable', behavior:function() { columns.push({id: 'name', 'type': 'str','readonly':true, caption: '#TEXT[XCOL_GRID_NAME]', value:'field.getAlias()', width:400}); columns.push({id: 'dataType', 'type': 'str','readonly':true, caption: '#TEXT[XCOL_GRID_FIELD_TYPE]', value:'RULE("getDisplayTypeName", $ENV.contextUnit, field.getAppType())', width:100}); return true; }, comments:'⇒ Interactor' });