$load s

s.QUIETû2
EXCLUDEû,`menu`report
INCLUDEûs.realClasses{}

printable{}:
	{
	(iû#cls Ý clsû(~clsÅEXCLUDE)/cls Ý clsûINCLUDE) do
		{
		â '$rm print.ps';
		clûi#cls;
		aûs.reference_object{cl};
		obû`Öcl;
		if (aÅ`TABLE `GRAPH)
			{
			chûÂ(Îcl),'_child';
			(`%ch)û`s%`s%a;
			(%ob)ûch;
			}
		else
			{
			(%ob)û`s%a;
			};
		ob is cl;
		ob has (`print;1);
		kûsys.readmat{'print.ps'};
		if (`null=©k) Õ'no print method: ',Îcl;
		};
	}

defaults{}:
	{
	() s.hasDefault (`bg;`blue;`fg;`white;`font;'kaplscreen-bold';`titlefg;`red;`titlefont;'courier-bold-24');
	(iû#cls Ý clsû(~clsÅEXCLUDE)/cls Ý clsûINCLUDE) do
		{
		Õ'***';
		clûi#cls;
		aûs.reference_object{cl};
		obû`Öcl;
		if (aÅ`TABLE `GRAPH)
			{
			chûÂ(Îcl),'_child';
			(`%ch)û`s%`s%a;
			(%ob)ûch;
			}
		else
			{
			(%ob)û`s%a;
			};
		Õ'binding ',Îcl;
		show ob is cl;
		Õ'state:';
		Õ`state of ob;
		if (aÅ`TABLE `GRAPH)
			{
			Õ'[***]';
			Õ'state:';
			Õ`state of ch;
			};
		};
	}

inherit{}:
	{
	.aûÉ10;
	.bû`a;
	`b is `table;
	show `b;
	`b has `bg `red `fg `blue;
	.cûÉ10;
	.bûb,`c;
	.bû`a;
	`c has `bg `green `fg `orange;
	.bûb,`c;
	.bû`c;
ã should be green+orange field within red(+blue) table and gray+black array
	}

nulls{}:
	{
	(iû#cls Ý clsû(~clsÅEXCLUDE)/cls Ý clsûINCLUDE) do
		{
		Õ'***';
		clûi#cls;
		aûs.reference_object{cl};
		obû`Öcl;
		if (aÅ`TABLE `GRAPH)
			{
			chûÂ(Îcl),'_child';
			(`%ch)û`s%`s%a;
			(%ob)ûch;
			}
		else
			{
			(%ob)û`s%a;
			};
		eatsûs.attributes{cl};
		eatsû(eats¨`class)/eats;
		Õ'binding ',Îcl;
		show ob is cl;
		Õ'reset to () all attributes (except `class) of ',Îcl;
		ob has (eats;(#eats)Ù());
		Õ'state:';
		Õ`state of ob;
		if (aÅ`TABLE `GRAPH)
			{
			Õ'[***]';
			cclû0Ø`class of ch;
			eatsûs.attributes{ccl};
			eatsû(eats¨`class)/eats;
			Õ'reset to () all attributes (except `class) of ',Îccl;
			ch has (eats;(#eats)Ù());
			Õ'state:';
			Õ`state of ch;
			Õ'freeing ',Îch;
			free ch;
			};
		Õ'freeing ',Îcl;
		free ob;
		};
	}

classes{}:
	{
	(iû#cls Ý clsû(~clsÅEXCLUDE)/cls Ý clsûINCLUDE) do
		{
		Õ'***';
		clûi#cls;
		aûs.reference_object{cl};
		obû`Öcl;
		if (aÅ`TABLE `GRAPH)
			{
			chûÂ(Îcl),'_child';
			(`%ch)û`s%`s%a;
			(%ob)ûch;
			}
		else
			{
			(%ob)û`s%a;
			};
		eatsûs.attributes{cl};
		Õ'binding ',Îcl;
		show ob is cl;
		Õ'get all attributes of ',Îcl;
		valsûeats of ob;
		Õ'reset all attributes of ',Îcl;
		ob has (eats;vals);
		Õ'state:';
		Õ`state of ob;
		if (aÅ`TABLE `GRAPH)
			{
			Õ'[***]';
			cclû0Ø`class of ch;
			eatsûs.attributes{ccl};
			eatsû(eats¨`class)/eats;
			Õ'get all attributes of ',Îccl;
			valsûeats of ch;
			Õ'reset all attributes of ',Îccl;
			ch has (eats;vals);
			Õ'state:';
			Õ`state of ch;
			Õ'freeing ',Îch;
			free ch;
			};
		Õ'freeing ',Îcl;
		free ob;
		};
	}

`t is `table;
if (¢1¨Ø`space of `t) {
  Õ'Error: `space of `table - ',îØ`space of `t;
}

if (0¦#s.COLOR_NAMES) {
  Õ">>ERROR<< s.COLOR_NAMES";
} else {
  Õ"Passed: s.COLOR_NAMES test";
}

classes{}
defaults{}
ã nulls{}
sys.exit{0}
