[futurebasic] Re: [FB] Program conversion

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

From: Jay Reeve <jayreeve@...>
Date: Fri, 25 Jan 2008 22:57:14 -0600
Bob,

In case Max is occupied, let me jump in...

On Jan 25, 2008, at 9:24 PM, Bob Bryce wrote:

> 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
DIM gMT as 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)
blockzero( @gMT, sizeof(gMT) )
> 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.
sizeof( gMT ) or sizeof( MTinfo )--either will work if you've dimmed  
gMT as MTinfo.

HTH,
   e-e
   =J= a  y
    "