How to reset referToData?
-
@dustbro Not quite what I'm after but I might be able to use this. I want to completely disconnect the tables from a data object.
-
@d-healey I imagine this would need another function that cancels what's made here:
void referToDataBase(var newData) { if (auto td = dynamic_cast<ScriptingObjects::ScriptComplexDataReferenceBase*>(newData.getObject())) { if (td->getDataType() != type) reportScriptError("Data Type mismatch"); otherHolder = td->getHolder(); setScriptObjectPropertyWithChangeMessage(getIdFor(getIndexPropertyId()), td->getIndex(), sendNotification); updateCachedObjectReference(); } else if (auto cd = dynamic_cast<ComplexDataScriptComponent*>(newData.getObject())) { if (cd->type != type) reportScriptError("Data Type mismatch"); otherHolder = cd; updateCachedObjectReference(); } }
-
@ustk Yes I considered that too but not sure how to implement it. I might have another go at it.
-
@d-healey I tried with no luck. First I just set the
otherHolder
tonullptr
but it didn't work.
something like this:void removeFromDataBase() { otherHolder = nullptr; }
So I thought the message notification had to change so I copied everything from de
referToData
function, setotherHolder
tonullptr
, and set the notifications todontSendNotification
, but that didn't work either so I gave up...
something like this:void removeFromDataBase(var data) { if (auto td = dynamic_cast<ScriptingObjects::ScriptComplexDataReferenceBase*>(data.getObject())) { if (td->getDataType() != type) reportScriptError("Data Type mismatch"); otherHolder = nullptr; setScriptObjectPropertyWithChangeMessage(getIdFor(getIndexPropertyId()), td->getIndex(), dontSendNotification); updateCachedObjectReference(); } else if (auto cd = dynamic_cast<ComplexDataScriptComponent*>(data.getObject())) { if (cd->type != type) reportScriptError("Data Type mismatch"); otherHolder = nullptr; updateCachedObjectReference(); } }
and of course adding a
removeFromData
that calls this one to related components... -
@ustk
bool removeDataObject(ExternalData::DataType t, int index) override { return true; }
Smells interesting...
-
@d-healey Seems like another dead-end :(
-
A related issue. How can I change the tableData that the table is referring to?
This doesn't work:
HiseSnippet 984.3ocsV8taaaCDmxIrnxacaEXO.B4SxHcFx1ccCHaXdwNovXKIdydECHHnfVhJhHzjBTTo0XXXEC6AaOH6C6QXuAaGojiTZMbhM5zGr0Qd+386Nc+giUxPZVlTgbbmtHkhb9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MRdncEfSB6EvbwmXj8toaIFGzN.MGtbzKCCMt+mAcjWMltaAldaAlmtEX97s.yy1BLewVf4KWKFy8R+1bsbdQ4.rv3irCHbbNRXZDZyBQ+WzdNyT
-
Christoph committed a solution yesterday. Now
referToData(-1)
will reset back to the tables internal object. -
-
-
@d-healey can you export on latest commit? Having issues here on osx....
-
@DanH Yes on GNU/Linux and Windows, haven't tried MacOS yet.
What issue are you having?
-
@d-healey a bunch of errors... Will have another go