TiTaNiuM sAMuRai Posted June 21, 2002 Share Posted June 21, 2002 If I first PushAttrs, then PopAttrs when I'm finished my PIO, are there any document settings that aren't restored? I modified the scale factor for some text, and, as a result, my document text settings get messed up, remaining so after the PIO has been executed. Whassup, Willis? Quote Link to comment
Guest Posted July 10, 2002 Share Posted July 10, 2002 Push/Pop Attrs only keep a few things, mostly related to the Attributes palette, but if you change an attribute that is not covered in Push/Pop Attrs, then you have to get the setting ahead of time, make your changes, then be sure to put it back the way you found it. Another approach is to use handle-based routines, if one is provided, so that the document attrs are not affected. I have found that heavy nested use of Push/Pop Attrs can slow a script down anyway, so I usually just set my own attrs when I am finished. AFAIK, the only settings that are saved and restored in Push/Pop Attrs are: Boolean textV; // t if picked up from textNode Boolean markV; // t if picked up from markered object ObjectColorType cType; // color record short ppat; // pen pattern short fPat; // fill pattern ByClassFlagsType isByClass; // whether graphic attributes are "by class" LineType lType; // line width-dash TDashPat lDashPat; // dash pattern definition SegStyleType sType; // marker size and placement short tFont; // font number short tSize; // font size in pagespace Style tStyle; // text style Byte tSpace; // text spacing Byte tJust; // text justification Str255 cName; // class name long wBits; // bitfield of which attrs to paste ObjRecHandle dataList; short toolID; hth... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.