Page 2 of 3
Re: styledtext, mixed content and clipboarddata
Posted: Sun Sep 04, 2022 10:10 am
by richmond62
Well . . .
-
-
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 . . .
-
-
STILL having problems with
BOLD and
SIZED.
-
I wonder why
BOLD is being reported as "mixed"?
-
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:
-
-
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:
-
-
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.
-
-
-
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."

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.
-
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.
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:
-
-
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?

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
it doesn't paste any text (presumably because it copies the object, not the text).
if you use
then the issue is as per my previous post:
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:
-
-
Pasting from LibreOffice to TextEdit works 100%
-
-
Pasting from TextEdit into LiveCode works 100%
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

), 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%:
-
-
Copies from NeoOffice to LiveCode WITHOUT bold:
-
-
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.

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.
Noli me tangere.