Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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);

}
like image 427
Alex Kwitny Avatar asked Feb 13 '12 18:02

Alex Kwitny


1 Answers

Instead referencing the macro like:

#MyMacro

You need to reference it like this:

#macrolib.MyMacro
like image 156
dlannoye Avatar answered Sep 30 '22 07:09

dlannoye