realbasic-nug
[Top] [All Lists]

Re: ALIGNMENT SAVING PROBLEM

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: ALIGNMENT SAVING PROBLEM
From: john roberts <jarobe01 at athena dot louisville dot edu>
Date: Fri, 30 Aug 2002 10:14:53 -0400
on 8/30/02 8:36 AM, Saad Abbasi at saadabbasi at applelinks dot net wrote:

> How the HELL can I save alignment information in a document.
> I've tried this:
> 
> Dim i as Integer
> Dim f as Folderitem
> Dim b as Binarystream
> 
> f=GetSaveFolderItem("text/plain")
> b=f.CreateBinaryFile("text/plain")
> For i=1 to Len(EditField1.Text)
> EditField1.SelStart=i
> b.WriteLong EditField1.Selalignment
> Next
> 
> 
> The above method works perfectly but its slow as hell. Can
> anyone please provide a more efficient routine for saving
> alignment information in a file.

Alignment data is by paragraph and not by character. Just check the
alignment of the first character of each paragraph.

John

PS: I don't believe that paragraph alignment info is contained in the
TextStyleData. It definitely is not part the original one which I
believe this is.



<Prev in Thread] Current Thread [Next in Thread>