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

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

hi fredrik,
recompiling is a tricky thing for the document class. scview just solves this problem by just closing all windows. all variables that should survive a recompile would have to have a primitive.
or maybe i can write one that brings all relevant ones into the lang.


On Dec 13, 2004, at 12:24 PM, f@xxxxxxxxxxxxxxxxxxx wrote:

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

sc-dev mailing list