XML, Squeak, and speed

Keith Hodges K.Hodges at ftel.co.uk
Tue May 15 16:43:00 UTC 2001


> If only I understood Text, Paragraphs, and ParagraphEditors well enough,
> so that I could render XML documents on-screen and edit them...

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.

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.

--
Idea 1.

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.]

e.g.

"<Color red>My Text" or "<Reference new:'Jn3v16'>For..."

So I got this to work. As you observe there is no mechanism that does the reverse
of Command-6.

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 <b> and </b> to the text that is being
rendered.

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.

--

Groovy Idea 2
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.

When in view formula mode the user would see this.

Pounds:"<pounds:=input asNumber>100"converts to
Dollars:"<dollars:=pounds*1.62>162"

When in user mode the user would see this.

Pounds:100 Dollars:162

--

Groovy Idea 3
Within this simple non-tabular speadsheet like calculator, more complex
datastructures could be supplied in XML.

Thus combining the Smalltalk query language with the representative power of XML.

--

any thoughts?

cheers

Keith


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010515/f2074399/attachment.htm


More information about the Squeak-dev mailing list