| To: | REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com> |
|---|---|
| Subject: | advice on methodology please |
| From: | Paul Harvey <realbasic at hiddenfield dot com> |
| Date: | Fri, 4 Jul 2003 21:14:46 +0100 |
|
I'm bumping my head against a wall here! I want to read a text file from the disc into an editfield [no problem] but parse some basic tags. Current tags are simply <b>...</b>, <i>...</i>. There will be others later. As an example: This is <b>some bold and <i>italic</i> text</b> I want to style the text according to the tags, in the case above it would be Bold and Italic text, but other tags would involve a number of style modifications to the text. The problem is how to read the file, strip the tags and set the styles in the editfield. I can go to StylData, but don't want to because of its complexity for something that doesn't seem to need it. I would rather work with SelBold, SelItalic, et al for the time being. The main problem I have is when a pair of tags are found and the text between is styled, the tags need to be removed. Using something like ReplaceAll or RegEx strips the styling from the text. Any ideas, however random are appreciated! -- Paul Harvey paul at hiddenfield dot com Hiddenfield Software "Creating useful software for Mac OS X" * Bible Reader Free www.hiddenfield.com |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Disk or StuffIt?, Seth Willits |
|---|---|
| Next by Date: | Re: Disk or StuffIt?, Joseph J. Strout |
| Previous by Thread: | Getopenfolderitem() problems, Dave DeLong |
| Next by Thread: | Re: advice on methodology please, Joseph J. Strout |
| Indexes: | [Date] [Thread] [Top] [All Lists] |