Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 05:29:12 +0000



sc.SetDefaults Code Block Resetting Blank Strings

View Count: 541

[2020-07-10 11:16:05]
kas64h - Posts: 87
String Inputs that have intentionally been set to blank in code are being reset to their default values when a chart/study is closed then re-opened. For example:

SCInputRef Test = sc.Input[0];

if (sc.SetDefaults)
{
Test.SetString("Test Text");
return;
}

If the user clears the Input completely or somewhere else in code the Input is cleared [i.e. Test.SetString("");], then the Input remains blank as long as the chart/study is open.
However, once the Chartbook is closed (and saved), then re-opened, the sc.SetDefaults code block is resetting the Input back to the Default ("Test Text" here).
If the Input is set to any value other than blank, then it retains it's value as expected and is not be set back to the default.

This results in all kinds of strange behaviours with inputs that had been intentionally set to blank in a previous session, suddenly having an unintended value in the next session.

I know this used to work, and thought this was still the intended behaviour.

Thanks.
[2020-07-10 19:47:24]
Sierra Chart Engineering - Posts: 104368
We understand the reason for the problem. This will be resolved in the next release.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2020-07-26 17:31:58]
binaryduke - Posts: 359
Has this been resolved? As of 2138 it still seems to be occurring.
[2020-07-27 01:57:04]
Sierra Chart Engineering - Posts: 104368
Yes this has been confirmed to be resolved. We ran a test right now and saving an empty Input string is restored, even when it is set to some other nonempty string in the sc.SetDefaults code block.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2020-07-27 01:57:21

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account