ArrayArrayArrayArrayArrayArray
BrainModularBrainModular Users Forum2019-03-13T16:29:22+02:00https://brainmodular.com/forums/app.php/feed/topic/63012019-03-13T16:29:22+02:002019-03-13T16:29:22+02:00https://brainmodular.com/forums/viewtopic.php?t=6301&p=40945#p40945So the issue is resolved.
Thanks all. Simon.
Statistics: Posted by sm_jamieson — 13 Mar 2019, 15:29
]]>2019-03-12T17:51:21+02:002019-03-12T17:51:21+02:00https://brainmodular.com/forums/viewtopic.php?t=6301&p=40935#p40935Statistics: Posted by senso — 12 Mar 2019, 16:51
Statistics: Posted by sm_jamieson — 12 Mar 2019, 14:15
]]>2019-03-07T00:06:31+02:002019-03-07T00:06:31+02:00https://brainmodular.com/forums/viewtopic.php?t=6301&p=40925#p40925 It is defined like this:
/// Getter for an existing setting line entry inline UsineEventPtr sdkGetSettingValue(AnsiCharPtr settingName) { UsineEventPtr settingEvent = nullptr; m_masterInfo->GetSettingValue(m_moduleInfo, settingName, settingEvent);
return settingEvent; }
But the SDK is wrong.The GetSettingValue need an existing event, not a null pointer.
This works for a sdkAddSettingLineSingle() :-
UsineEventPtr event; m_masterInfo->GetSettingValue(m_moduleInfo, "Minimum value", event); float val = sdkGetEvtData(event); sdkSetSettingValue("Maximum value", event); // copy event to another setting
However this does not work for a sdkAddSettingsLineString() :-
m_masterInfo->GetSettingValue(m_moduleInfo, "Parameter Name", event); AnsiCharPtr pname = sdkGetEvtPChar(event); sdkSetSettingValue("Parameter Name 2", event); // does not work - text is blanked in setting
I have not tried all the other setting line types.
But the problem still exists. You cannot set a setting line string from within a User Module. I have tried on recent Usine version 3.0.186.
Can we please have a method to set the setting line string in the SDK ? Either make sdkSetSettingValue() work for strings (best solution) or add something like sdkSetSettingsLineString("Param Name", string).
Thanks, Simon.
Statistics: Posted by sm_jamieson — 06 Mar 2019, 23:06
]]>2019-02-21T12:46:42+02:002019-02-21T12:46:42+02:00https://brainmodular.com/forums/viewtopic.php?t=6301&p=40899#p40899We need a way to set the SettingsLineString from within the SDK.
Thanks, Simon.
Statistics: Posted by sm_jamieson — 21 Feb 2019, 11:46
]]>2018-10-18T17:11:46+02:002018-10-18T17:11:46+02:00https://brainmodular.com/forums/viewtopic.php?t=6301&p=40272#p40272When the settings line string is changed in the settings panel, Usine allocates memory and writes a Unicode representation of the string to that memory, then modifies the pointer to point to the Unicode string.
However, there is no proper way in the SDK to set the setting string in a User Module.
It is possible to alter the string up to the size allocated by Usine, but this is really a hack, and you cannot assign a longer string.
I thought that sdkGetSettingValue() and sdkSetSettingValue() could be used to do this, but sdkGetSettingValue() always causes Usine to crash.
Can we please have a method to set the setting line string in the SDK ? For example, something like sdkSetSettingsLineString(string).
Statistics: Posted by sm_jamieson — 18 Oct 2018, 17:11
]]>BrainModularBrainModular Users Forum2019-03-13T16:29:22+02:00https://brainmodular.com/forums/app.php/feed/topic/63012019-03-13T16:29:22+02:002019-03-13T16:29:22+02:00https://brainmodular.com/forums/viewtopic.php?t=6301&p=40945#p40945So the issue is resolved.
Thanks all. Simon.
Statistics: Posted by sm_jamieson — 13 Mar 2019, 15:29
]]>2019-03-12T17:51:21+02:002019-03-12T17:51:21+02:00https://brainmodular.com/forums/viewtopic.php?t=6301&p=40935#p40935Statistics: Posted by senso — 12 Mar 2019, 16:51
]]>2019-03-12T15:15:56+02:002019-03-12T15:15:56+02:00https://brainmodular.com/forums/viewtopic.php?t=6301&p=40933#p40933 Simon.
Statistics: Posted by sm_jamieson — 12 Mar 2019, 14:15
]]>2019-03-07T00:06:31+02:002019-03-07T00:06:31+02:00https://brainmodular.com/forums/viewtopic.php?t=6301&p=40925#p40925 It is defined like this:
/// Getter for an existing setting line entry inline UsineEventPtr sdkGetSettingValue(AnsiCharPtr settingName) { UsineEventPtr settingEvent = nullptr; m_masterInfo->GetSettingValue(m_moduleInfo, settingName, settingEvent);
return settingEvent; }
But the SDK is wrong.The GetSettingValue need an existing event, not a null pointer.
This works for a sdkAddSettingLineSingle() :-
UsineEventPtr event; m_masterInfo->GetSettingValue(m_moduleInfo, "Minimum value", event); float val = sdkGetEvtData(event); sdkSetSettingValue("Maximum value", event); // copy event to another setting
However this does not work for a sdkAddSettingsLineString() :-
m_masterInfo->GetSettingValue(m_moduleInfo, "Parameter Name", event); AnsiCharPtr pname = sdkGetEvtPChar(event); sdkSetSettingValue("Parameter Name 2", event); // does not work - text is blanked in setting
I have not tried all the other setting line types.
But the problem still exists. You cannot set a setting line string from within a User Module. I have tried on recent Usine version 3.0.186.
Can we please have a method to set the setting line string in the SDK ? Either make sdkSetSettingValue() work for strings (best solution) or add something like sdkSetSettingsLineString("Param Name", string).
Thanks, Simon.
Statistics: Posted by sm_jamieson — 06 Mar 2019, 23:06
]]>2019-02-21T12:46:42+02:002019-02-21T12:46:42+02:00https://brainmodular.com/forums/viewtopic.php?t=6301&p=40899#p40899We need a way to set the SettingsLineString from within the SDK.
Thanks, Simon.
Statistics: Posted by sm_jamieson — 21 Feb 2019, 11:46
]]>2018-10-18T17:11:46+02:002018-10-18T17:11:46+02:00https://brainmodular.com/forums/viewtopic.php?t=6301&p=40272#p40272When the settings line string is changed in the settings panel, Usine allocates memory and writes a Unicode representation of the string to that memory, then modifies the pointer to point to the Unicode string.
However, there is no proper way in the SDK to set the setting string in a User Module.
It is possible to alter the string up to the size allocated by Usine, but this is really a hack, and you cannot assign a longer string.
I thought that sdkGetSettingValue() and sdkSetSettingValue() could be used to do this, but sdkGetSettingValue() always causes Usine to crash.
Can we please have a method to set the setting line string in the SDK ? For example, something like sdkSetSettingsLineString(string).