Monday, November 08, 2010 at 12:07 AM.

system.verbs.builtins.window.attributes.addGroup

on addGroup (adrtable, adrwindow=nil) {
	<<Changes:
		<<7/7/01; 9:52:19 PM by JES
			<<Fixed a bug where attributes could not be added if the window did not already have an /atts table.
	if adrwindow == nil {
		adrwindow = window.frontmost ()};
	
	local (adrparent = parentOf (adrwindow^));
	if defined (adrparent^) {
		local (adratts = @adrparent^.["/atts"]);
		if not defined (adratts^) {
			adratts^ = adrtable^;
			return (true)};
		
		local (adrnewitem);
		for adrnewitem in adrtable {
			table.assign (@adratts^.[nameof (adrnewitem^)], adrnewitem^)}};
	return (true)}
<<bundle //testing
	<<local (t); new (tableType, @t)
	<<t.foo = "bar"
	<<addGroup (@t)



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.