false anti-alarm
Charles Hartman
charles.hartman at conncoll.edu
Sun Jul 10 10:02:15 EDT 2005
The idea is to call this handler from an openStack handler, so as to
change the stack-default font while preserving style tags and either
preserving, or allowing a global change of, the font for any text
where font is specified:
on changeFieldTextProps myStack,f,mySize,myFont,myMonoFont
repeat with c = 1 to the number of cards of stack myStack
if exists(field f of card c of stack myStack) then
put the htmlText of field f of card c of stack myStack \
into hold[c]
end if
end repeat
set the textSize of stack myStack to mySize
set the textFont of stack myStack to myFont
repeat with c = 1 to the number of cards of stack myStack
if exists(field f of card c of stack myStack) then
set the htmlText of field f of card c of stack myStack \
to hold[c]
end if
end repeat
end changeFieldTextProps
This works when it is called on the main stack of an app. When it is
called on a substack, it screws up. IN THE SUBSTACK ONLY, wherever
there's a *style* change, Rev inserts (right before the style tag) a
*font* tag, which hard-wires whatever *was* the default font before.
Therefore everything after the first style-tag in the field fails to
switch to the new default font. Why would this happen in the substack
and not the main stack?
<omit several paragraphs of rant>
Charles Hartman
More information about the use-livecode
mailing list