Table.setContentCallback() -> undefined parameter 0
-
Hello to all! :-)
I want to add a contentCallback function to my table. This is my code:
pTable.setContentCallback(pointAdded()); inline function pointAdded() { Console.print("Point added, removed or changed."); }
Unfortunately I get the following error message:
API call with undefined parameter 0
Does anyone know what I need to pass to the function or where the error is? I have already tried
event
andcomponent
as function variables. Neither solves the problem.Thank you very much
Oli -
The reason for the error is probably because you're including
()
at the end of the assignment. -
@d-healey
Ah, yes! That was the problem! Thank you very much, David! -
-
@d-healey @Oli-Ullmann I'm still unable to get this to work. Any ideas?
-
@clevername27
Try this:dynamicsPlaygroundTable0bject.setContentCallback(DynPlayTableUI_Callback);
Explanation:
I assume thattable_MODEL_DynPlayground_Table_GUI
is just a table in the user interface. This component does not have thesetContentCallback()
function. Only the table of a processor has this function. That's why you have to use the processor table. -
@Oli-Ullmann @d-healey Thanks for your suggestion, I did try that - I'm wondering if this is related to the table also being in a Scriptnode Network?