Why does a localmacro work in Class Dec, but not if I put it in a Macro object?
Asked Answered
F

1

5

I created a macro object in the AOT called "MyMacro". In it I put:

#localmacro.myStrFmt
    'Here is some text before (' + %1 + ') and some after'
#endmacro

In my class it works if I have it defined locally in the run method or class dec, but not if I use the #MyMacro. Is there a different syntax or something?

void run()
{
//    #MyMacro
    str retVal;

    #localmacro.myStrFmt
        'Here is some text before (' + %1 + ') and some after'
    #endmacro

    ;

    retVal = #myStrFmt("Text in parenthesis");

    info (retVal);

}
Falange answered 13/2, 2012 at 18:5 Comment(0)
I
7

Instead referencing the macro like:

#MyMacro

You need to reference it like this:

#macrolib.MyMacro
Ingles answered 13/2, 2012 at 18:58 Comment(1)
THANKS! This has been driving me nuts.Falange

© 2022 - 2024 — McMap. All rights reserved.