Page 1 of 1

[macro.return] and frames

Posted: Thu Aug 10, 2017 11:58 pm
by Xaelvaen
I'm having trouble using a macro.return function in a frame. Basically, I have a frame that takes player input. I send that information to another macro to be calculated. What I'd like that to do, is use a macro.return function to then display that information at the bottom of the same frame. It seems, though, that macro.return isn't working <form action***>.

A, is this even possible?
B, if not, is there some workaround? Perhaps reloading the same frame from the same calling macro with new jsons?

Re: [macro.return] and frames

Posted: Fri Aug 11, 2017 3:21 am
by wolph42
its possible, but not with macro.return. a different method is required: Forms tutorial

Re: [macro.return] and frames

Posted: Fri Aug 11, 2017 2:52 pm
by Xaelvaen
Not exactly what I was looking for - I used that tutorial to build my onChange~ character sheet. However, I just used a workaround like I mentioned above where the sheet is simply re-opened with the rolled information in place. Didn't want to do that, because it's a lot trickier, but since a simple macro.return wouldn't work, I guess I had no choice.

Thanks for the response, Wolph!

Re: [macro.return] and frames

Posted: Fri Aug 11, 2017 3:03 pm
by aliasmask
Yeah, there's no javascript so any changes made require the form to be redrawn. It's usually called a call back from another function. So, the macro you call needs call the callback to redraw the frame.

Re: [macro.return] and frames

Posted: Sat Aug 12, 2017 9:10 am
by JamzTheMan
FYI there is some javascript support in the dev version and my fork, although I have not played with it at all... Do a search and you should find some info?

Again, not sure if it will help you in this situation though, it's mostly an alternative way of doing macro logic AFAIK.

Re: [macro.return] and frames

Posted: Sat Aug 12, 2017 9:43 am
by Xaelvaen
I know absolutely nothing about javascript, and pretty much any html I use, I just use w3schools to tell me what I'm doing XD.

I just used the normal method of [openFrame] macro, [theSheet], and refreshing it all through macro.args. I was honestly just looking for a shortcut to that process, but it is what it is, and I'll get the job done one way or the other!

Thanks though, Jamz.

Re: [macro.return] and frames

Posted: Sat Aug 12, 2017 12:36 pm
by JamzTheMan
No problem, definitely stick with what you are doing then! :)