Displaying styled text
sarahr at genesearch.com.au
Thu Dec 5 20:42:01 EST 2002
When I tested it, I realised I had made a mistake in the script.
put endChar into skipChar
needs to be
add endChar to skipChar
On Thursday, December 5, 2002, at 11:46 pm, Toma Tasovac wrote:
> Dear Sarah,
> thanks a lot for your suggestion. Setting the numbers to bold works
> perfectly, but I'm still having problems with setting the bracketed
> text to
> italics. The script below works correctly only if there is one
> of a pair of brackets. If there are two, Revolution hangs up on me;
> and if
> there are three or more occurrences, only the first two pairs are set
> italic + Rev hangs up.
>> on mouseUp
>> put 0 into skipChar
>> put offset("(", fld "Data", skipChar) into startChar
>> put offset(")", fld "Data", skipChar) into endChar
>> if startChar = 0 or endChar = 0 then exit repeat
>> set the textStyle of char startChar+skipChar to endChar+skipChar of
>> fld "Data" to "italic"
>> -- this includes the brackets
>> put endChar into skipChar
>> end repeat
> I don't see what the problem is.
> Any help will be greatly appreciated.
> All best,
> Toma Tasovac
> Princeton University
> Department of Comparative Literature
> 318 East Pyne
> Princeton, NJ 08544
> ttasovac at princeton.edu
> ttasovac at post.harvard.edu
> use-revolution mailing list
> use-revolution at lists.runrev.com
More information about the Use-livecode