set the textStyle["box"] of word x of line y to true is very fast

Richmond richmondmathewson at gmail.com
Fri Feb 21 02:26:00 EST 2014


On 20/02/14 22:48, Richard Gaskin wrote:
> 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?

set the textStyle["plain"] of fld "myNONSENSE" to true

>
> -- 
>  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
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list