[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] Document.current isNil bug

hi jan,
thanks a lot for help fighting the Document class.  here's another one i can't
handle on my own.

Document.allDocuments.do{|d| d.dump}

leave the help doc open and recompile with cmd+k

Document.open("Help/Help.help.rtf")	//here returns nil
Document.allDocuments.do{|d| d.dump}	//and just seem generally corrupted
(title/colours etc nil)

traced it this far: detect below doesn't find the doc after recompile.

	//private open
	initFromPath { arg apath, selectionStart, selectionLength;
		var stpath;
		path = apath;
		stpath = this.class.standardizePath(path);
		this.propen(stpath, selectionStart, selectionLength);
			^this.class.allDocuments.detect({|d| d == this})

don't know if this helps but here's another example with background colour...

d= Document.open("Help/Help.help.rtf")
Document.allDocuments.do{|d| d.dump}


Document.allDocuments.do{|d| d.dump}	//background= nil but doc still red

something rotten here...

     fredrikolofsson.com     klippav.org     musicalfieldsforever.com