field losing formatting on copying
paulhibbert at mac.com
Fri Jun 6 17:26:14 EDT 2014
The textStyle isn't a problem, it's the size that's causing the problem, so you could try this it works in the test stack…
(Do it Button script)
if exists(grp "J_1" of this cd) then
delete grp "J_1" of this cd
copy grp "J_1" of cd 1 of stack "rawForms" to this cd
set the topleft of it to 1,1
command resetTextHeight pGrp
repeat with i = 1 to the number of fields in grp pGrp
if the short name of fld i = "Label Field" then
set the textSize of fld i to textSize of word 1 of fld i
set the textSize of word 1 to -1 of fld i to empty
On 2014-06-06, at 11:51 AM, Dr. Hawkins <dochawk at gmail.com> wrote:
> On Fri, Jun 6, 2014 at 10:04 AM, Paul Hibbert <paulhibbert at mac.com> wrote:
>> Changing the original fields by removing the size applied to the raw text
>> (i.e. use owners size) and applying the correct textSize to the fields also
>> resolves the problem.
> I'll try that on offending fields tomorrow.
> The reason it's applied to the text is that these were done by cut & paste
> from the official pdfs, to retain font selection, etc.
> so when looping through the fields,
> if the short name of fld i = "Label Field" then
> set the textStyle of fld i to textStyle of the text of fld i
> set the textStyle of the text fld i to empty
> end if
> Setting the attributes of the card or stack won't work, as there will be
> multiple sizes & typefaces on a given piece of output.
> But anyway, this still leaves the issue in the engine that when a field
> copies, the attributes of its contents are not . . . and this is in
> prettymuch every version of 5.5.x and 6.x. (The most recent I have before
> that are HyperCard 2.0 and SuperCard 1.5, so . . . :)
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode