Robert asked concerning my suggestion to use
cfs.flags = _kControlUseFontMask _kControlUseSizeMask
instead of
cfs.flags = _kControlUseSizeMask
> I cannot interpret this suggestion. Please explain.
Robert,
In Tiger 10.4.11 setting cfs.flags to _kControlUseSizeMask (or 4)
will always cause the text to be set at 13 point on launch regardless
of what other size may be specified. Setting the flags to
_kControlUseFontMask _kControlUseSizeMask (or 5) causes the text to
set at the specified point size-- in this case 24 pt.
When I first ran the code using _kControlUseFontMask
_kControlUseSizeMask in Tiger 10.4.11 and the point size set to 24,
everything seemed to work fine with cut and paste and regular typing
all returning 24 point in the EUTC.
Then Steve Van Voorst wrote me backdoor and said he could not
duplicate my results. I did some more exhaustive testing here and
discovered that the code reacts differently to keyboard command key
combinations and menu selections. (All day at work I use keyboard
commands for cut and paste, and that's what I used in my initial tests.)
Here's the interesting part:
Assuming you've set cfs.flags to 5, when the demo first launches all
the text should be 24 pt and selected. Immediately invoke a Command-X
from the keyboard, followed by a Command-V keyboard paste. On my end
this always works returning 24 point. If you then delete the selected
text using the keyboard's Delete key, cut and paste continues to
work. However, upon the second invocation of Cut and Paste from the
Edit menu, the code fails. If you continue to use keyboard
combinations, it seems to work or fail at random.
What I'm surmising is that somehow invoking Cut is causing the text
to lose its Style flavor causing it to revert to plain text. Is there
anything being generated in FBtoC's C code that would intercept an
Edit menu command and alter its standard EUTC behavior?
Ken