set the textStyle["box"] of word x of line y to true is very fast
Richard Gaskin
ambassador at fourthworld.com
Thu Feb 20 15:48:54 EST 2014
Richmond wrote:
>> Although I noticed "set the textStyle["plain"]" or "set the
>> textStyle["empty"]" throws an error. I think it should be allowed.
>
> That's odd, as the documentation has this:
>
> "Value:
> The textStyle of an object or chunk is either "plain", empty,
> "mixed", or one or more of the following, separated by commas:
> * bold
> * italic
> * underline
> * strikeout
> * box
> * threeDbox
> * link (or group)
> * condensed
> * expanded
>
> Comments:
> Setting the textStyle to "plain" turns off all styles. (Setting the
> textStyle to "plain" plus one or more additional styles may result in
> anomalous behavior.)"
>
> However, having just tested them (LC 6.6) I can confirm that they do
> throw errors.
>
> Bug report time!
Maybe not - further on in the Dictionary entry for textStyle it notes:
Changes: As of version 5.0.2 a new array variant of the textStyle
property has been added allowing for access to individual
textStyles independently from the others by specifying the required
style as an array key.
the textStyle[<style>]
Here, style can be one of bold, condensed, expanded, italic,
oblique, box, threedbox, underline, strikeout, link.
"Plain" isn't included as one of the options when using the array
syntax, which makes sense because "plain" isn't a specific style per se
but merely the absence of any other.
I recently made a Style menu with a lot of code using the new array
syntax, and it was adapted from older code that used the older syntax,
and neither failed in v6.6.
What is the syntax you find that throws errors?
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
Follow me on Twitter: http://twitter.com/FourthWorldSys
More information about the use-livecode
mailing list