Author Topic: deleteVariables clarification  (Read 501 times)

Can I delete variables in a scriptobject using the deleteVariables function, like for example if I wanted to delete a variable array in %this called savedMembers ?

Have you tried it? It seems like an easy thing to test and get a definitive answer for
I'm pretty sure the answer is yes, because it's a string based variable name search.

I tried setting the scriptobject to a global variable and doing deleteVariables("$scriptobject.array*"); , but it seems the variables are still there when i dump the object.
Is there a way around this?

I tried setting the scriptobject to a global variable and doing deleteVariables("$scriptobject.array*"); , but it seems the variables are still there when i dump the object.
Is there a way around this?

Probably not, just take 5 minutes and write the function yourself.

Probably not, just take 5 minutes and write the function yourself.

The difference is that deleteVariables literally evaporates the variables from existance (the registry). Setting them to "" won't remove them. Secondly, you can't search through non-tagged fields.