Re: Top things you are waiting for ....

2023-11-13 Thread Neville Smythe via use-livecode
 • Font styles

• Get/set text baselines

Neville Smythe




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What to set the clipboardData to for exchanging styled text with a 3rd party app

2023-11-13 Thread Bob Sneidar via use-livecode
Couldn’t you choose door number 2? Using just the clipBoardData without a 
parameter is something I never do anymore. 

Bob S


> On Nov 13, 2023, at 11:24 AM, Craig Newman via use-livecode 
>  wrote:
> 
> Hi.
> 
> I always use the “htmlText”.
> 
> Of course this encodes the original text with HTML tags, so you cannot just:
> 
> set the clipBoardData to the htmlText of fld 1
> set the text of fld 2 to the clipBoardData
> 
> you have to:  set the htmltext of fld 2 to the clipBoardData
> 
> 
> 
> Craig
> 
> 
>> On Nov 13, 2023, at 12:18 PM, Paul Dupuis via use-livecode 
>>  wrote:
>> 
>> Hivemind,
>> 
>> Recommendation as to what is best to set the clipboardData property to, when 
>> you want to copy styled text from a field to the clipboard for exchange with 
>> a 3rd party (any 3rd party) application that supports some form of styled 
>> text, that can include text in multiple languages (i.e. Unicode)?
>> 
>> Examples:
>> 1) set the clipboardData["rtf"] to the rtfText of fld "X"
>> 2) set the clipboardData["html"] to the htmlText of fld "X"
>> 3) set the clipboardData["text"] to the text of fld "X" -- since the text in 
>> field since LC7 is unicode
>> 4) set the clipboardData["unicode"] to the textEncode(fld "X","UTF-16")
>> 
>> Something else? Should fullClipboardData or rawClipboardData be used 
>> instead? Looking for best practice recommendation.
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What to set the clipboardData to for exchanging styled text with a 3rd party app

2023-11-13 Thread Craig Newman via use-livecode
Hi.

I always use the “htmlText”.

Of course this encodes the original text with HTML tags, so you cannot just:

set the clipBoardData to the htmlText of fld 1
set the text of fld 2 to the clipBoardData

you have to:  set the htmltext of fld 2 to the clipBoardData



Craig


> On Nov 13, 2023, at 12:18 PM, Paul Dupuis via use-livecode 
>  wrote:
> 
> Hivemind,
> 
> Recommendation as to what is best to set the clipboardData property to, when 
> you want to copy styled text from a field to the clipboard for exchange with 
> a 3rd party (any 3rd party) application that supports some form of styled 
> text, that can include text in multiple languages (i.e. Unicode)?
> 
> Examples:
> 1) set the clipboardData["rtf"] to the rtfText of fld "X"
> 2) set the clipboardData["html"] to the htmlText of fld "X"
> 3) set the clipboardData["text"] to the text of fld "X" -- since the text in 
> field since LC7 is unicode
> 4) set the clipboardData["unicode"] to the textEncode(fld "X","UTF-16")
> 
> Something else? Should fullClipboardData or rawClipboardData be used instead? 
> Looking for best practice recommendation.
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


What to set the clipboardData to for exchanging styled text with a 3rd party app

2023-11-13 Thread Paul Dupuis via use-livecode

Hivemind,

Recommendation as to what is best to set the clipboardData property to, 
when you want to copy styled text from a field to the clipboard for 
exchange with a 3rd party (any 3rd party) application that supports some 
form of styled text, that can include text in multiple languages (i.e. 
Unicode)?


Examples:
1) set the clipboardData["rtf"] to the rtfText of fld "X"
2) set the clipboardData["html"] to the htmlText of fld "X"
3) set the clipboardData["text"] to the text of fld "X" -- since the 
text in field since LC7 is unicode

4) set the clipboardData["unicode"] to the textEncode(fld "X","UTF-16")

Something else? Should fullClipboardData or rawClipboardData be used 
instead? Looking for best practice recommendation.



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Oddity in 'currentCard' function?

2023-11-13 Thread Bob Sneidar via use-livecode
I never create an object without immediately giving it a name. Problem solved. 
:-)

Bob S


On Oct 24, 2023, at 9:34 PM, Mark Waddingham via use-livecode 
 wrote:

On 2023-10-24 18:00, Paul Dupuis via use-livecode wrote:
I think I found a oddity in the "currentCard" property.
The documentation states that the currentCard property return the short name of 
the current card of a stack:
for example: put the currentCard of stack "Untitled 1" into tCardName
You can then execute code such as: set the myProperty of cd tCardName of stack 
"Untitled 1" to tValue

...

But again, breaking that example above (set the myProperty of the currentCard 
of stack "Untitled 1" to tValue) into 2 lines:
put the currentCard of stack "Untitled 1" into tCardName
set the myProperty of cd tCardName of stack "Untitled 1" to tValue
FAILS if the card has no name.
Something just seems off here?

As Jacque said, if an object has an empty name then the short name returns 
` id ` (i.e. an id chunk) - this is long standing behavior and one 
which I'm not sure is entirely helpful (it should perhaps just return empty!).

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode