Page 2 of 3

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 10:10 am
by richmond62
Well . . .
-
SShot 2022-09-04 at 12.06.08.png
-
Does NOT work properly with:

1. BOLD text.

2. Sized text.

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 10:48 am
by richmond62
Blast . . .
-
SShot 2022-09-04 at 12.46.01.png
-
STILL having problems with BOLD and SIZED.
-
I wonder why BOLD is being reported as "mixed"?
-
SShot 2022-09-04 at 12.49.23.png

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 11:00 am
by richmond62
OK, OK, Happy Campers . . . IFF you are still keeping the faith with me . . .

1. BOLD:

I had set the word 'stout' to bold from the MenuBar:
-
SShot 2022-09-04 at 12.53.29.png
-
and setting text to "bold" like this is reported by LiveCode as "mixed" (which is badly inconsistent).

If, instead of this, a word is set to bold this way:
-
SShot 2022-09-04 at 12.52.16.png
-
it is reported by LiveCode as "bold".

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 11:03 am
by richmond62
2. textSize . . . bad case of my Sunday morning stupidity, because textSize
is textSize, and NOT textStyle.
-
SShot 2022-09-04 at 12.55.08.png
-
SShot 2022-09-04 at 12.56.14.png
-

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 11:04 am
by richmond62
HOWEVER . . .

This is NOT useful in any way whatsoever for importing styled text from the clipboard that
originated outwith LiveCode. :(

AND, as one can just do this sort of thing:

Code: Select all

set the styledText of fld 2 to the styledText of fld 1
this whole exercise has been "one of those pointless exercises Richmond is extremely good at doing." 8)

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 2:51 pm
by richmond62
After considerably more mucking about what has become clear is that the Macintosh clipboard
does NOT copy text styles between apps, BUT is does copy colours.
-
SShot 2022-09-04 at 16.49.57.png

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 4:01 pm
by stam
richmond62 wrote: Sun Sep 04, 2022 2:51 pm After considerably more mucking about what has become clear is that the Macintosh clipboard
does NOT copy text styles between apps, BUT is does copy colours.
Errrr... no. That statement is wrong/nonsensical.

The mac clipboard most certainly copy/pastes both styles and colours between apps.
Not sure what you're doing... see the the pic below where text created and styled/coloured in textEdit is pasted into Pages.app AND into an LC field, preserving both styles and colour on each paste.
color copy-paste with styles.jpg

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 4:19 pm
by richmond62
Errrr... no. That statement is wrong/nonsensical.
'nonsensical' may be subjective:

Copying from LibreOffice (as per my picture) did NOT bring BOLD across.

I shall try again . . . results on their way:
-
SShot 2022-09-04 at 18.17.05.png
-
1. No Italic.
2. No Bold.
3. No HyperLink.
4. No Size.
-
So (this should be fun),
can you explain why there is a difference between what you are getting and what I am getting? 8)

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 4:22 pm
by FourthWorld
Rodney, as an experimental control have you considered trying the copy command?

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 4:24 pm
by stam
Nope, not really that fun at all if i'm honest...
richmond62 wrote: Sun Sep 04, 2022 4:19 pm 'nonsensical' may be subjective:
It is nonsensical because a) that doesn't happen and b) do you really think Apple would allow this to be the case.
richmond62 wrote: Sun Sep 04, 2022 4:19 pm Copying from LibreOffice (as per my picture) did NOT bring BOLD across.
And that is your answer. It must be LibreOffice not copying stuff correctly, not the "mac clipboard"

Why don't you try TextEdit, which is installed on all macs and see what results you get?

S.

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 4:32 pm
by stam
FourthWorld wrote: Sun Sep 04, 2022 4:22 pm Rodney, as an experimental control have you considered trying the copy command?
this still has the issue reported above.

if you use

Code: Select all

copy field 1
it doesn't paste any text (presumably because it copies the object, not the text).

if you use

Code: Select all

copy char 1 to -1 of field 1
then the issue is as per my previous post:
just copy.jpg
The only solution to Rodney's problem i can see is to specifically define the text style of the non-link text as 'plain' - then it pastes plain text with the link formatted as a link.

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 4:34 pm
by richmond62
OK, 'darling', TextEdit it is:
-
SShot 2022-09-04 at 18.28.47.png
-
Pasting from LibreOffice to TextEdit works 100% 8)
-
SShot 2022-09-04 at 18.30.55.png
-
Pasting from TextEdit into LiveCode works 100% 8)

So, what in the name of @#$%^&! is happening between LibreOffice and LiveCode without
an intermediate (TextEdit) stage?

Whichever way you shuffle your cards (nonsensically or sensibly :P ), that should
make us think as, for the sake of argument, a developer has no way whatsoever of knowing
where an end-user is going to copy text from to paste into a LiveCode field.

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 4:41 pm
by stam
Probably just advise not to use LibreOffice on Mac then.

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 4:44 pm
by richmond62
Copies from LibreOffice into NeoOffice 100%:
-
SShot 2022-09-04 at 18.41.07.png
-
Copies from NeoOffice to LiveCode WITHOUT bold:
-
SShot 2022-09-04 at 18.42.35.png
-
and, at that point, I will remind you what my late father told me his favourite hobby was:

Banging my head against the wall.

and why?

Because it feels great when it stops. :D

Re: styledtext, mixed content and clipboarddata

Posted: Sun Sep 04, 2022 4:45 pm
by richmond62
You are going to "T-off" quite a few clients if you issue them with a long advisory list. 8)

Noli me tangere.