Re: Missing function selectedWords/selectedTrueWords

2018-08-31 Thread Tore Nilsen via use-livecode
We certainly are. I can already think of several sarcastic phrases to use, should the situation call for it! :) And since my students all know me well enough from earlier years, they will expect as much. Tore > 31. aug. 2018 kl. 22:13 skrev Mark Waddingham via use-livecode > : > > P.S.

Re: Missing function selectedWords/selectedTrueWords

2018-08-31 Thread Mark Waddingham via use-livecode
On 2018-08-31 20:57, Tore Nilsen via use-livecode wrote: The array form may well be what I need. I do think I still will have to wait some time before I introduce it to my students. Perhaps - certainly 'textFont' and 'textSize' have less syntactic baggage. However, the actual underlying

Re: Missing function selectedWords/selectedTrueWords

2018-08-31 Thread Tore Nilsen via use-livecode
It worked as advertised, provided I also check for the instance of the given textStyle to be false, this works a charm. The code I need to show to my students is easy enough for them to understand, without the need to actually understand arrays. Thank you! Best regards, Tore > 31. aug. 2018

Re: Missing function selectedWords/selectedTrueWords

2018-08-31 Thread Mark Waddingham via use-livecode
On 2018-08-31 20:51, Tore Nilsen via use-livecode wrote: I got a bit confused there. Pages behaves as you say, Microsoft Word would turn off bold on the initial push of the button, then adding bold to the styles the next time. This is why I thought I needed to find the style of each word in a

Re: Missing function selectedWords/selectedTrueWords

2018-08-31 Thread Tore Nilsen via use-livecode
The array form may well be what I need. I do think I still will have to wait some time before I introduce it to my students. Best regards Tore > 31. aug. 2018 kl. 21:39 skrev Mark Waddingham via use-livecode > : > > The key thing here is that using the array form of textStyle treats each >

Re: Missing function selectedWords/selectedTrueWords

2018-08-31 Thread Tore Nilsen via use-livecode
I got a bit confused there. Pages behaves as you say, Microsoft Word would turn off bold on the initial push of the button, then adding bold to the styles the next time. This is why I thought I needed to find the style of each word in a group of words when the the textStyles is mixed. And I

Re: Missing function selectedWords/selectedTrueWords

2018-08-31 Thread Tore Nilsen via use-livecode
Beats "looping around» all the text any day! I think I can use this with my students in a couple of months time. For now, I think I have to stick to the more basic tasks of just altering fonts, text size, text color and text styles for single word selections. Best Regards Tore Nilsen >

Re: Missing function selectedWords/selectedTrueWords

2018-08-31 Thread Mark Waddingham via use-livecode
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

Re: Missing function selectedWords/selectedTrueWords

2018-08-31 Thread Tore Nilsen via use-livecode
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

Re: Missing function selectedWords/selectedTrueWords

2018-08-31 Thread hh via use-livecode
You could try: on mouseUp put the selectedChunk into sc put word 2 of sc into strt put word 4 of sc into stp put fld word 7 of sc into txt put selectedWords(strt,stp,txt) into fld "out" end mouseUp function selectedWords strt,stp,txt put the num of words in char 1 to strt of txt into

Re: Missing function selectedWords/selectedTrueWords

2018-08-31 Thread Mark Waddingham via use-livecode
On 2018-08-31 19:47, Tore Nilsen via use-livecode wrote: This information is useful if you want to implement changes to the styles of the selected text, where textStyles report mixed. In a selection with mixed styles, setting the textStyle has to be done on a word by word basis (or char by char

Missing function selectedWords/selectedTrueWords

2018-08-31 Thread Tore Nilsen via use-livecode
I am struggling with a problem related to the selection of parts of a text in a field. I would like to know which words are selected, that is, I would like to know the range of words selected. None of the functions available in LiveCode will do this. If I use selectedChunkI will get the range