ftp.nice.ch/pub/next/graphics/vector/PencilTWO.s.tar.gz#/PencilTWO/Source/PencilLibrary/DocToAttr.tcl

This is DocToAttr.tcl in view mode; [Download] [Up]

# add all graphic objects in current document to the attributes list
# look for file <documentname>.names that gives the attributes' names

catch {unset onames}
set docpath [file root [P_name]]
if [file exists $docpath.names] {
	set f [open $docpath.names]
	set i 0
	foreach n [read $f] {
		set onames($i) $n
		incr i
	}
	close $f
}

set doc [file tail $docpath]

set c [P_objectcount]
for {set i 0} {$i<$c} {incr i} {
P_select1 $i
if [info exists onames($i)] {addAttr $onames($i)} {addAttr $doc$i}
}
catch {unset onames}
 

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.