[comp.sys.mac.hypercard] Tabs Within Fields

alan@mtxinu.COM (Alan Tobey) (05/09/89)

I know that tabs aren't visually represented within Hypercard fields -- but
Hypercard somehow maintains a record of where tab characters reside.
I'm trying to retrieve this information so I can kludgily pad out tabs
with spaces for an application which requires that.

For example, if you paste tabular data into a Hypercard field, the tabs
disappear -- even looking char by char at the chars or charToNum's of the
contents of the field shows nothing where the tab is embedded.  But if you
cut the field content and paste it into a word processor, the tabs 
reappear in their proper places.

So:  How do I find them hidden tab chars in the contents of a field?

dan@Apple.COM (Dan Allen) (05/09/89)

In article <850@mtxinu.UUCP> alan@mtxinu.COM (Alan Tobey) writes:
>I know that tabs aren't visually represented within Hypercard fields -- but
>
Hypercard somehow maintains a record of where tab characters reside.

Actually HyperCard DELETES all characters less than ASCII 32 (except for
a carriage return) when closing a field.  This is probably not the right
thing to do, but that what it does.  This means that importing text into
a field maintains the tab (which is not displayed), but as soon as you
click in the text, the tab is removed.  Usually a tab appears just like
a space, but after removing it the text gets squashed together.  This
will be fixed in HC 2.0.

Dan Allen
Apple Computer