Login Page - Create Account

Support Board


Date/Time: Tue, 21 Jan 2025 10:54:58 +0000



Post From: Persistent Variables Set Before SetDefaults() are Getting Reset

[2018-08-12 18:32:59]
BlakJak - Posts: 108
I tested this fix over the weekend and it is not working as far as my use case is requiring it.

SetDefaults() is called when you click "Add Custom Study" to the chart, and before it is even added to your chart. This means that my constructor code to create my Study object is being called and the pointer to the object saved as a Persistent Pointer even before the study is added to the chart. This is fine for me, however on the next pass when GetPersistentPointer() is called on this key, it returns NULL so my program is forced to create a new object and ultimately crashes.

I need the GetPersistentPointer() to record the pointer even if the study is just being listed as an option to add.