How to make macro return a value #121498
Unanswered
imgeopineda
asked this question in
Programming Help
Replies: 2 comments
-
If you want to call the selectRandomoayment() function and get a random payment method string, you should call it directly rather than trying to invoke it as a macro |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @imgeopineda! Thanks for being a part of the GitHub community! I've moved your post to our Programming Help category, as it may be more likely to get more responses there. Best of luck! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
I'm trying to call a macro function and return a value. but it keeps returning empty string
here is the macro:
`@Macro("[Select Random Payment Method]")
fun selectRandomPayment(): String {
here is the sample function calling the macro
val randomPaymentMethod = it.macro("[Select Random Payment Method]").toString()
Beta Was this translation helpful? Give feedback.
All reactions