gzz-dev
[Top][All Lists]
Advanced

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

[Gzz] Encapsulating enfilade/string matching in CellTexter?


From: B. Fallenstein
Subject: [Gzz] Encapsulating enfilade/string matching in CellTexter?
Date: Thu, 25 Jul 2002 20:24:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.0.0) Gecko/20020614 Debian/1.0.0-3

Hi,

looking at the interfaces, I just got the idea of encapsulating enfilade matching (the stuff Tuomas is just working on, getting a new list of spans from the old spans plus the edited text as a String). That would mean having VStreamCellTexter.setText() match the new string against the old text instead of simply using one *new* text span.

I really like the encapsulation here, because then the bindings wouldn't have to worry about whether the space supports spans at all: when appropriate, they'd use the insertText() etc. methods, and when not appropriate (e.g. extedit) they use the setText() method and it works.

A small complication arises because Tuomas suggests that image spans should be represented through special tags when doing external editing, so that they can be put back in the correct place by the enfilade/string matcher. We'd like the interface above to be symmetrical:

    text = cell.t()
    text = callExternalEditor(text)
    cell.setText(text)

Then, cell.t() would have to put in the image spans as special tags (e.g., <<IMAGE:328o78234>> or what-you-like) into the returned string-- that's an interface change.

That would be nice for text output, because we could *see* that an image is in the cell. But it does mess up the character counts for insertText() etc., which is REALLY BAD. Needs more thinking.

- Benja




reply via email to

[Prev in Thread] Current Thread [Next in Thread]