------------------------ Charles Yeomans http://www.declareSub.com/
On Feb 24, 2007, at 4:19 PM, James Sentman wrote: > As I'm trying to figure out why sometimes I get a crash of the PPC > compiled app when accessing the TextStyleData inside the TextChanged > event, it occurrs to me that this is the old way of doing things and > I really should be using the StyleRun and other such new classes. > > I had thought the point of these classes were so that you could work > with the low level style data the same on windows and the mac. But > while I can write the TextStyleData out as a string and restore it > via the SetTextAndStyle method, I can't see any way to save a chain > of style run classes. > > Is there a way to save them out to a file or a stream for > reconstructing later? It would be really great if I could make styled > documents that were cross platform. But I dont see an obvious way to > do this. I have read through what I thought were the appropriate > sections of the documentation but it seems the only access to the > information is as linked objects and not as an underlying structure > that could be saved. > > What am I missing? Or am I expecting too much and have to continue to > use the TextStyleData which is platform specific? I've encountered the same problem. I have to support both PPC and Intel boxes, and the crashes related to TestStyleData and endianness caused me some pain. You could write some code to represent a StyledText object as XML. Or you could wait until EditFields add RTF support; according to the "feedback" system, it is now in the r2 alphas. This, of course, does not guarantee that it will appear in r2. I'm leaning toward XML, because I can implement and debug it myself, and because I've learned how to use XQL. Charles Yeomans _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
