Holiday Teaser 1: ESTO

December 13th, 2007 by Jonathan Johnson

It’s hard to write a teaser about this upcoming project, code named ESTO, so I’ll do more showing than telling. Let’s start with a vanilla REALbasic window, and add a multiline field to it:

Now, add about ten lines of code and hit Run:

If you’re interested in guessing how we did it, you can download the data source for the above rendering. And lastly, I would like to point out that this compiles and runs on Windows also.

Update: After some more sleep…

We’ve realized how lame our joke with the “data source” being empty was. We originally thought it would add to the mystique showing we didn’t have a data source by showing an empty zip file. Unfortunately, the joke’s on us because it just made it look like we messed up.

For the record, all of the fields contents were created in code. :)


COMMENTS

7 Responses to “Holiday Teaser 1: ESTO”

  1. Danny Says:

    You guys have to stop this I can’t take the suspense ;-)
    Seriously though, you guys have some really cool stuff in the works! Keep it coming.

  2. Thomas Tempelmann Says:

    Ahem, the downloadable archive is _empty_!

    Also, I cannot see any challenge here yet. What’s the news? The picture inside the text? The sub/superscript? The coloring? Isnt’t that all standard style stuff? (not that I’ve ever tried to insert a pic into a text field). Did you add a html renderer to Text fields? Hmm, but that would mean you’d have a wysiwyg html editor. Probably not.

  3. Jonathan Johnson Says:

    Nope, the regular editfield has no support for pictures, sub/superscript, and background colors. You’re right, they’re standard styles, but the API is the real reason I developed it :) Of course, you’ll have to wait to see that. ;)

  4. Thomas Tempelmann Says:

    Ah, right! It’s BG color, not text color. Now, it dawns on me slowly. I’m curious how this’ll work.

  5. Tom Russell Says:

    Well I hope this come to fruition soon cause I could really use it on my next job!

    What might the speed be like with alot of text and highlighting many different words? Is it done sequentially?

    Tom

  6. Jonathan Johnson Says:

    Without spoiling too much (which is why I haven’t replied until now), speed is between “good” and “excellent.” It’s actually very good, but compared to NSTextView, we don’t currently thread out loading up the contents for the first time, so initial loading of text > 60k or so takes a couple seconds. However, for most uses that applications do, the text files are generally less than 32k, and those load up darn near instantly.

    Highlighting is a little harder to explain. The field is composed of objects, one of which is a “text object.” The picture you see is a separate Picture Object. Every object has essentially an optimized dictionary of arbitrary attributes for various ranges within the object. Selection is tackled in two ways: first, the field itself manages a simple SelStart and SelLength, and secondly, it sets a “selected” attribute over the selected range. When the renderer, a separate object that is usable without a field (ie, offscreen printing), draws the text, it will:

    1. Check to see if the Selected attribute is present. If so, draw the background as the selection color
    2. Check to see if the BackgroundColor attribute is present. If so, draw the background as the BackgroundColor

    So, you can actually make non-contiguous selections show up by setting the Selected attribute over various ranges, but the field itself doesn’t natively support non-contiguous selections (yet). It probably won’t in version 1.0.

    Anyways, consider this a second teaser :) A pubic beta should be available in the next few weeks.

  7. Alacatia Labs, Inc. » Blog Archive » TextKit Released as Public Beta Says:

    […] you remember back to our teasers, we previewed a new product code-named ESTO. We’ve since named the product TextKit, and […]

Leave a Reply