[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Moving SGs to Frames (was simple calendar question)



Reply to note from "Patricia M. Godfrey"  Tue,
31 Jul 2007 20:07:56 -0400

Patricia:

> I had tried this when you and Carl first came up with this
> solution, but it didn't work, because most of my SGs were
> UseStyle commands. And without the SaveStyle command in U2 (or
> the Keyboard file), Xy beeped like mad.

When a string in an XPL code produces side effects like that, you
have to work around it. There are many instances in U2. For
example, double braces, {{ or }} -- reserved strings that enclose
the name and type ID of frames (routines) in U2 and other Xy Help
files -- will crash U2 (or any other Xy Help file) if they appear
literally within any frame in the file. (Use-Mention rears its
head.) So, if you need to save {{ and/or }} to a Save/Get (because,
e.g., you're writing a routine that constructs a Help frame on the
fly), you can't simply say ; you have to do something like
. Another example is ;*; , the XPL comment symbol.
If you try to manipulate it as an ordinary string, as in
, the code will be misinterpreted and your routine
will bomb; whereas  works as intended.

(Here's a nifty one from frame RELABEL, which operates on LaBel and
GoLabel statements in XPL code:
)+">")+("<"+"GL"){238}(@upr()+">
"){<}-1>. Note the use of ("<"+"LB") and "<"+"GL" to avoid "",
to balance the left guillemet in the aforementioned (non-)LB and
(non-)GL statements.)

You see, of course, where I'm leading. If  in your frame is
causing error beeps, you need to recast it as an equivalent string
that Editor will not treat as a formatting command. Instead of
, try ">. Looks weird, but is perfectly
legal. And bingo -- no more beeps.

--
Carl Distefano
cld@xxxxxxxx