You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lets say i have a macros.httl that is imported in httl.properties with 2 macros, macroA and macroB. macros.httl
#macro(macroA(something))
hello world
#end
#macro(macroB(something))
<p>
$!{macroA(someParams)}
</p>
#end
And in another httl file called test.httl, i can call macroA successfully, meaning the import is working fine. Also, in the same httl file, i'm also calling macroB, and it fails with an error msg saying macroA cannot be found.
Why cannot macroB sees macroA even when they're in the same macros.httl file ?
The error message is something like:
Caused by: java.text.ParseException: No such macro "macroA" or import method macroA(httl.util.Status,java.util.List,java.lang.String).
Occur to offset: 1203, line: 32, column: 57, char: i, in:
But when i tried copying macroA within macroB, it runs ok, but this means duplicating a lot of macros within another macro.
Am i doing this wrongly ? Please advise.
The text was updated successfully, but these errors were encountered:
albert-kam
changed the title
Imported macro cannot see other macros within the imported file.
Imported macro cannot see other macros within the same file.
Dec 28, 2019
Lets say i have a macros.httl that is imported in httl.properties with 2 macros, macroA and macroB.
macros.httl
And in another httl file called test.httl, i can call macroA successfully, meaning the import is working fine. Also, in the same httl file, i'm also calling macroB, and it fails with an error msg saying macroA cannot be found.
test.httl:
Why cannot macroB sees macroA even when they're in the same macros.httl file ?
The error message is something like:
But when i tried copying macroA within macroB, it runs ok, but this means duplicating a lot of macros within another macro.
Am i doing this wrongly ? Please advise.
The text was updated successfully, but these errors were encountered: