Missing function selectedWords/selectedTrueWords

Mark Waddingham mark at livecode.com
Fri Aug 31 15:39:26 EDT 2018


On 2018-08-31 20:33, Tore Nilsen via use-livecode wrote:
> Microsoft Word seems to behave the way you suggest, in the sense that
> if any given text style is present among the words in the selection
> then it is removed. Pages behaves differently. If a given text style
> is true for some of the words in the selection, Pages will initially
> keep this style for these words and add it to the styles of the rest
> of the chunk. If a given text style is true/false for all words in the
> selection, Pages will set the text style to false/true accordingly. To
> mimic these behaviours it would be useful to be able to do so on a
> word by word basis.

I'm not sure I follow... In pages if I have

Hello <b>World</b> Foo <i>Bar</i>

If I select the whole lot - then 'textStyle["bold"]' (in LC speak) will 
be 'mixed' - this is indicated by the 'Bold' button in pages not being 
highlighted. If I click the 'Bold' button then it does the equivalent of 
'set the textStyle["bold"] of the selectedChunk to true', if I click 
again it does the same as setting the same property to false. In both 
cases 'Bar' remains italic.

The key thing here is that using the array form of textStyle treats each 
individual text style completely separately.

Perhaps I misunderstand what you meant?

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list