### callOnChildren

Expanding and utilizing the engine via C++.

#### callOnChildren

newaged
Posts: 31
Joined: Sat Feb 14, 2015 12:27 am
Ran into another problem I managed to fix. If this isn't the right forums for posts like these, or if I should be doing this on github, please let me know.
Anyways, the simgroup/simset function callOnChildren wasn't working, so I changed

Code: Select all

void SimSet::callOnChildren(simSet.cpp line 232){   ...   ConsoleValueRef args[21];   args[0] = method.c_str();

to this

Code: Select all

   ConsoleValue vals[2];   ConsoleValueRef args[21];   vals[0].init();   vals[0].setStringValue(method.c_str());   args[0].value = &vals[0];   vals[1].init();   args[1].value = &vals[1];

and things started to work again. Was that the right way to go about it?
Last edited by newaged on Thu Jan 21, 2016 10:00 pm, edited 1 time in total.

#### Re: callOnChildren

Mud-H
Posts: 175
Joined: Thu Feb 19, 2015 3:08 pm
Was it causing a crash? I stopped using the callOnChildren after it caused too much crash, also if I remember right it was not always working correctly when it wasn't causing crash...

#### Re: callOnChildren

newaged
Posts: 31
Joined: Sat Feb 14, 2015 12:27 am
Mud-H wrote:Was it causing a crash? I stopped using the callOnChildren after it caused too much crash, also if I remember right it was not always working correctly when it wasn't causing crash...

Yeah, it was causing a crash before. I haven't used it enough to comment on the second problem.

#### Re: callOnChildren

JeffR
Steering Committee
Posts: 777
Joined: Tue Feb 03, 2015 9:49 pm

Yeah, if you feel you have a useful addition or fix, feel free to toss it up onto github. Bit easier to test/review it that way, but also feel free to make a thread bringing attention to it

I'll have to give this fix a go. I don't REMEMBER having problems with callOnChildren, but then, I haven't used it a ton.

#### Re: callOnChildren

newaged
Posts: 31
Joined: Sat Feb 14, 2015 12:27 am
Updated the code - removed some pointless changes

@
JeffR
I'll look into posting these fixes on github. Should they be batched together or done individually?

#### Re: callOnChildren

Azaezel
Posts: 392
Joined: Tue Feb 03, 2015 9:50 pm

fwiw, PRs with a given task show up when checking a files history on the github website so that'd help folks understand the why on changes. Least that's the personal rule of thumb...

#### Who is online

Users browsing this forum: No registered users and 1 guest