Displaying styled text

Sarah sarahr at genesearch.com.au
Thu Dec 5 20:42:01 EST 2002


Sorry Toma,

When I tested it, I realised I had made a mistake in the script.
The line
	put endChar into skipChar
needs to be
	add endChar to skipChar

Cheers,
Sarah

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 
> occurrence
> 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 
> to
> italic + Rev hangs up.
>
>> on mouseUp
>> put 0 into skipChar
>> repeat
>> 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
> http://lists.runrev.com/mailman/listinfo/use-revolution
>





More information about the use-livecode mailing list