Re: clipboarddata["html"] problem

2006-03-22 Thread André . Bisseret


Le Wednesday, 22 Mar 2006, à 17:21 Europe/Paris, [EMAIL PROTECTED] a 
écrit :


I am using a button to put a text field on the clipboard. I set the 
clipboarddata["html"] to the htmltext of the field, then when I try to 
paste into MS Word, my field formatting does not come through. 
Instead, the default textFont and textSize for the stack is what 
determines the format of the pasted text -- I have experimented with 
this, and changing the field properties has zero effect on the paste, 
whereas changing the stack properties changes the paste. As an added 
complication, though, setting the textFont of the stack works 
perfectly, but when I set the textSize of the stack to 10, it comes 
through as 12. All other sizes work the way they are supposed to: 
stack textSize of 9 results in size 9 text in the paste, stack 
textSize of 14 comes through as 14, etc. Only stack textSize of 10 
comes through as 12.


here's the relevant portion of the script:

put fld "wordPath" into wordpath
put fld "letterPath" into letterPath
put theHdr into fld "formatPrintText"
set the textFont of fld "formatPrintText" to "Bookman Old Style"
set the textSize of fld "formatPrintText" to "10"
set the clipboarddata["html"] to the htmltext of fld "formatPrintText"
set the clipboarddata["text"] to theHdr -- * see below
launch letterPath with wordpath

* (I've tried not setting the clipboarddata["text"] and it makes no 
difference.)


I'm puzzled. The clipboarddata["html"] clearly is not getting set 
properly. I am using Dreamcard v2.6.1 build 152 on a Mac iBook running 
OSX v10.4.5, and Word for Mac v11.2.3. The problem with the size 10 
getting seen as size 12 appears to be a Word problem, since the paste 
into another text app comes through as expected.


Hi Peter,


Why doesn't the htmlText of the field get onto the clipboard?

I recently discovered that, after "select text of fld "suchField" :

1 - put the selectedText into fld "essai"  -->> doesn't keep format 
when paste

2 - put the selection into fld "essai" -- >> idem
3 - set the clipboardData["text"] to the selectedText -->> idem
4 - set the clipboardData["text"] to the selection -- >> idem
BUT :
5 - copy the selectedText -->> paste in Word remains formatted
6 - copy the selection -- >> remains formatted
(Mac G4 ; 0SX 10.2.8 ; RR ; Word 10.1.0)

Best regards from Grenoble
André

Why in the world should the default text properties of the stack have 
any effect here?


Peter M. Brigham
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution





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


Re: clipboarddata["html"] problem

2006-03-22 Thread J. Landman Gay

[EMAIL PROTECTED] wrote:

I am using a button to put a text field on the clipboard. I set the
clipboarddata["html"] to the htmltext of the field, then when I try
to paste into MS Word, my field formatting does not come through.
Instead, the default textFont and textSize for the stack is what
determines the format of the pasted text -- I have experimented with
this, and changing the field properties has zero effect on the paste,
whereas changing the stack properties changes the paste. As an added
complication, though, setting the textFont of the stack works
perfectly, but when I set the textSize of the stack to 10, it comes
through as 12. All other sizes work the way they are supposed to:
stack textSize of 9 results in size 9 text in the paste, stack
textSize of 14 comes through as 14, etc. Only stack textSize of 10
comes through as 12.

here's the relevant portion of the script:

put fld "wordPath" into wordpath
put fld "letterPath" into letterPath
put theHdr into fld "formatPrintText"
set the textFont of fld "formatPrintText" to "Bookman Old Style"
set the textSize of fld "formatPrintText" to "10"
set the clipboarddata["html"] to the htmltext of fld "formatPrintText"
set the clipboarddata["text"] to theHdr -- * see below
launch letterPath with wordpath

* (I've tried not setting the clipboarddata["text"] and it makes no
difference.)

I'm puzzled. The clipboarddata["html"] clearly is not getting set
properly. I am using Dreamcard v2.6.1 build 152 on a Mac iBook
running OSX v10.4.5, and Word for Mac v11.2.3. The problem with the
size 10 getting seen as size 12 appears to be a Word problem, since
the paste into another text app comes through as expected.

Why doesn't the htmlText of the field get onto the clipboard? Why in
the world should the default text properties of the stack have any
effect here?


When you set the text properties of a field, the text it contains has no 
styling of its own, it uses inheritance of the field's properties to 
give an appearance of styling. Therefore, when you copy that text, there 
is no particular htmltext assigned to it.


To fix that, set the styling of the actual characters in the text 
itself, which does assign html properties to the text:


set the textfont of char 1 to -1 of fld "formatPrintText" \
 to "Bookman Old Style"
set the textsize of char 1 to -1 of fld "formatPrintText" to 10

This should give the results you are looking for.

--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


clipboarddata["html"] problem

2006-03-22 Thread pmbrig
I am using a button to put a text field on the clipboard. I set the 
clipboarddata["html"] to the htmltext of the field, then when I try to paste 
into MS Word, my field formatting does not come through. Instead, the default 
textFont and textSize for the stack is what determines the format of the pasted 
text -- I have experimented with this, and changing the field properties has 
zero effect on the paste, whereas changing the stack properties changes the 
paste. As an added complication, though, setting the textFont of the stack 
works perfectly, but when I set the textSize of the stack to 10, it comes 
through as 12. All other sizes work the way they are supposed to: stack 
textSize of 9 results in size 9 text in the paste, stack textSize of 14 comes 
through as 14, etc. Only stack textSize of 10 comes through as 12.

here's the relevant portion of the script:

put fld "wordPath" into wordpath
put fld "letterPath" into letterPath
put theHdr into fld "formatPrintText"
set the textFont of fld "formatPrintText" to "Bookman Old Style"
set the textSize of fld "formatPrintText" to "10"
set the clipboarddata["html"] to the htmltext of fld "formatPrintText"
set the clipboarddata["text"] to theHdr -- * see below
launch letterPath with wordpath

* (I've tried not setting the clipboarddata["text"] and it makes no difference.)

I'm puzzled. The clipboarddata["html"] clearly is not getting set properly. I 
am using Dreamcard v2.6.1 build 152 on a Mac iBook running OSX v10.4.5, and 
Word for Mac v11.2.3. The problem with the size 10 getting seen as size 12 
appears to be a Word problem, since the paste into another text app comes 
through as expected.

Why doesn't the htmlText of the field get onto the clipboard?
Why in the world should the default text properties of the stack have any 
effect here?

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