While the return part of custom functions now works as intended I suppose (cool!), it's also safe to say that the beta version is somewhat buggy indeed.
I now have an issue where I cant use the block "Set Parameter Value" in visual logic.
Trying to set the value of the parameter 0x9 to test.
Inserting that block alone gives me the code:
params.getParam('', '0x9', 0).setValue(test);
Doing the same with the script palette however gives me the code:
params.setValue(0x9, 0, '[value]');
Running the block version gives me the following error in debug window:
10:15:57:986: OGScript exception in script named >>>anonymousLabelTask<<< with content
function thisIsTheDashBoardReservedFunctionName() {
/********* The line above was added by DashBoard because ogScript tasks are functions. *********/
/*! block id=1050 !*/
params.getParam('', '0x9', 0).setValue(test);
/*!!
<block id="1050" type="param_setvalue" x="286" y="165" w="318" PARAM="[root, Panel Parameters, prosent (0x9)]" VALUE="test" />
!!*/
/*!!<checksum>fb1d74d3209255554fe4dd151bf19a00</checksum>!!*/
/********* The lines below were added by DashBoard because ogScript tasks are functions. *********/
}
thisIsTheDashBoardReservedFunctionName()
// This is the end of the ogScript
EXCEPTION MESSAGE:
org.mozilla.javascript.EcmaError: TypeError: Cannot call method "setValue" of null (anonymousLabelTask#8)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3951)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3929)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3962)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3981)
at org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3998)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2414)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2407)
at org.mozilla.javascript.gen.anonymousLabelTask_211._c_thisIsTheDashBoardReservedFunctionName_0(anonymousLabelTask:8)
at org.mozilla.javascript.gen.anonymousLabelTask_211.call(anonymousLabelTask)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3282)
at org.mozilla.javascript.gen.anonymousLabelTask_211.call(anonymousLabelTask)
at com.rossvideo.common.oglml.ogscript.task.RunOGScriptTask.interpretScript(RunOGScriptTask.java:88)
at com.rossvideo.common.oglml.ogscript.task.RunOGScriptTask.run(RunOGScriptTask.java:113)
at com.rossvideo.common.oglml.ogscript.OGScriptTaskQueue$1.run(OGScriptTaskQueue.java:210)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at com.rossvideo.common.lnf.rice.util.integration.AwtEnvironment$FilteringEventQueue.dispatchEvent(AwtEnvironment.java:361)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
--------------------------------------------------------------------------------
So while, again, I could code it. Sadly it doesnt work in beta either (I know it's a beta, so no worries :) )
Guess I'll wait for a stable update with the return values in visual logic.
Thanks again though @jamespeltzer, excellent support as allways!
#DashBoard