Squeak Class Documentation category index | class index  
 
RemoteString
  category: System-Files
  superclass: Object
  subclasses:

My instances provide an external file reference to a piece of text. It may be the sourceCode of a method, or the class comments of a class.

The changes file or file-in file usually has a chunk that is just the source string of a method:

max: aNumber
^ self > aNumber ifTrue: [self] ifFalse: [aNumber]!

I can return either a String or a Text. Some a chunk is followed by a second chunk (beginning with ]style[) containing style information. The encoding is like this:

max: aNumber
^ self > aNumber ifTrue: [self] ifFalse: [aNumber]!
]style[(14 50 312)f1,f1b,f1LInteger +;i!

Allowed TextAttributes are TextFontChange, TextEmphasis, TextColor, TextDoIt, TextKern, TextLink, TextURL. TextFontReference and TextAnchor are not supported.

See PositionableStream nextChunkText and RunArray class scanFrom:.

instance methods
  accessing
  position
setSourcePointer:
sourceFileNumber
sourcePointer
string
text

  private
  checkSum:
fileNumber:position:
makeNewTextAttVersion
string:onFileNumber:
string:onFileNumber:toFile:

class methods
  as yet unclassified
  currentTextAttVersion
initialize
newFileNumber:position:
newString:onFileNumber:
newString:onFileNumber:toFile:
structureAt:

instance methods
  accessing top  
 

position

Answer the location of the string on a file.


 

setSourcePointer:


 

sourceFileNumber

Answer the index of the file on which the string is stored.


 

sourcePointer


 

string

Answer the receiver's string if remote files are enabled.


 

text

Answer the receiver's string asText if remote files are enabled.


  private top  
 

checkSum:

Construct a checksum of the string. A three byte number represented as Base64 characters.


 

fileNumber:position:


 

makeNewTextAttVersion

Create a new TextAttributes version because some inst var has changed. If no change, don't make a new one.


 

string:onFileNumber:

Store this as my string if source files exist.


 

string:onFileNumber:toFile:

Store this as the receiver's text if source files exist. If aStringOrText is a Text, store a marker with the string part, and then store the runs of TextAttributes in the next chunk.


class methods
  as yet unclassified top  
 

currentTextAttVersion

The current configuration of the TextAttributes classes has a structures array describing the inst vars of the classes (SmartRefStream instVarInfo:). Return tag that indexes the TextAttributeStructureVersions dictionary (4 random characters).


 

initialize

Derive the current TextAttributes classes object structure


 

newFileNumber:position:

Answer an instance of me fora file indexed by sourceIndex, at the
position anInteger. Assume that the string is already stored on the file
and the instance will be used to access it.


 

newString:onFileNumber:

Answer an instance of me for string, aString, on file indexed by
sourceIndex. Put the string on the file and create the remote reference.


 

newString:onFileNumber:toFile:

Answer an instance of me for string, aString, on file indexed by
sourceIndex. Put the string on the file, aFileStream, and create the
remote reference. Assume that the index corresponds properly to
aFileStream.


 

structureAt: