<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>

<blockquote TYPE=CITE>If only I understood Text, Paragraphs, and ParagraphEditors
well enough,
<br>so that I could render XML documents on-screen and edit them...</blockquote>

<p><br>Just to let you know that I am interested in some of the same stuff
as you. I want to write an editor that uses Attributes to store cross references.
I would like for the attribute optionally to display the cross reference
in the text but not have it editable. Or for the reference to be displayed
in an editable form.
<p>I tried some experiments that have led me to think that I need to spend
a considerable amount of time studying Paragraphs and Paragraph editors.
<p>--
<br><b>Idea 1.</b>
<p>In thinking about this project I started to adapt the TextAttribute
subclass: #TextThingAttribute so that it evaluates any Smalltalk code and
stores this as part of the attribute. [I think that all of the existing
linking features should be absorbed into a mechanism built upon this idea.]
<p>e.g.
<p>"&lt;Color red>My Text" or "&lt;Reference new:'Jn3v16'>For..."
<p>So I got this to work. As you observe there is no mechanism that does
the reverse of Command-6.
<p>I did not seem to find a mechanism for an Attribute to actually change
the content of the text that is being scanned, although the TextAnchor
(I think it is) seems to be able to add an embedded morph. I thought that
it might be an idea if the bold attribute could be set to add &lt;b> and
&lt;/b> to the text that is being rendered.
<p>This leads me to beleive that a two pass mechanism will be needed. i.e.
the text and complex attributes need to be scanned and processed into a
text and style only attributes for rendering. Instinctively I think that
there should be a better way of doing this but I need to learn the framework
first.
<p>--
<p><b>Groovy Idea 2</b>
<br>It struck me that we ought to be able to write a kind of end user spreadsheet
like modelling engine that uses attributes that store and evaluate smalltalk
code like this.
<p>When in view formula mode the user would see this.
<p>Pounds:"&lt;pounds:=input asNumber>100"converts to Dollars:"&lt;dollars:=pounds*1.62>162"
<p>When in user mode the user would see this.
<p>Pounds:100 Dollars:162
<p>--
<p><b>Groovy Idea 3</b>
<br>Within this simple non-tabular speadsheet like calculator, more complex
datastructures could be supplied in XML.
<p>Thus combining the Smalltalk query language with the representative
power of XML.
<p>--
<p>any thoughts?
<p>cheers
<p>Keith
<br>&nbsp;
<br>&nbsp;</html>