[futurebasic] Program conversion

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2008 : Group Archive : Group : All Groups

From: "Bob Bryce" <rrbryce@...>
Date: Sat, 26 Jan 2008 03:24:10 +0000
Hi,

Thanks Max for your help on my Globals. You suggested I clean them up as
follows;

BEGIN RECORD MTInfo
DIM as str255 MTfontName$
DIM as str15  MTfontSize$
DIM as str255 MTStyleName$
DIM as str15 MTStyleNumber$
DIM as str15  MTsb$
DIM as str15 MTsa$
DIM as str15 MTsl$
DIM as short MTBold%
DIM as short MTItalic%
DIM as short MTUnderline%
DIM as shortButtonState%
END RECORD

DIM gMT.MTInfo

This works, only it seems I also have to DIM all this also in the MT window 
also
as FB objects that MTfontName$ etc.hasn't been dimmed. It seems the LOCAL FN
can't see my Golobals.

The good part is that my function to get the info keyed into the fields in 
my MT Window
can be retrieved with gMT.MTfontName$ etc. So my LOCAL FN does pick up
gMT from the Globals file.

I have a Function to erase the info in the MT window when Cancel is pressed.
Clicking Cancel calls the following function;

LOCAL FN BlankMTRecord
DEF BLOCKFILL (@gMT, _MT, 0)
END FN

This only works if _MT form my original program is replaced with something
like "26." However this only erases the font name in the first field.
I want to erase ALL fields; MTfontName$, MTfontSize$, MTStyleName$
MTStyleNumber$ ... in their respective fields.

What can I use in place of _MT?? MTInfo doesn't work here either.

Thanks,

Bob Bryce