[ThirdPartyNode] How do I get ExternalData update to call a function?
-
I have some tables as ExternalData working, but how do I tell the rest of the code the tables have updated?
This crashes:
void setExternalData(const ExternalData& ed, int index) { data = ed; TableIndexType idx = index; ed.referBlockTo(tableValues[idx], 0); accountForUpdate(); // crashes here }
So is there a specific callback of some sort I should use?
-
-
@Christoph-Hart Alright so making it
inline
does the job, but then the data somehow refuses toReadLock
. This Mean my update function cannot account for it... What's the wizardry here? TheWriteLock
is still active? But then what do I do?ExternalData data; void setExternalData(const ExternalData& ed, int index) { data = ed; ed.referBlockTo(tableValues, 0); accountForUpdate(); // crashes here } inline void accountForUpdate() { DataReadLock rl(data); if (rl) { // never goes there form setExternalData, // but works from other calling points } }