Currently get/setters do not support namespaces in the return type. Attached is a simple patch that adds support for scopes in IsVirtualPropertyDecl() which previously did not check for them. I also added a simple test case.
Edit: First diffs I generated in the wrong order, fixed.
Hi, I'm trying to get information about a script class's methods and parameters. Getting the name of the method and then the type id of each of the parameters works just fine, but when I try to get the name or default arguments it gives me a nullptr. I saw in asIScriptFunction::GetParam you have a comment that says that it doesn't work with pre-compiled bytecode w/o debug symbols, but this wasn't pre-compiled. The size of parameterNames in asIScriptFunction is 0.
I'm trying to create a way to dynamically call methods on a script object, in order to do this I thought I would suspend execution on the active context, create a new context and execute the method, then resume execution on the original context. To start to test this plan I first am trying to suspend the execution and thats where I've hit a issue. I call Suspend on the context and it returns a value of 0, but then if I check the current state it says that it's still active.
Here is my code for suspending, it's part of a template class
bool callMethodVoid(void *objRef, int typeId, const UString& methodName)
asIScriptContext* ctx = asGetActiveContext();
int r = ctx->Suspend();
printf("Suspend Return: %i\n", r);
printf("Current State: %i\n", ctx->GetState());
r = ctx->Execute();
printf("Execute Return: %i\n", r);
Here is the output for above:
Suspend Return: 0
Current State: 6
Execute Return: -4
It's called in the script language with the following
stdout << "Works!";
Any idea what would keep the context from suspending?
Hi, I'm trying to get the dictionary add-on to work with ref-counted strings. After I replaced all the uses of std::string with my own most things worked except for the initialization lists and index operators. I was able to initialization lists working with the following change to how the name is extracted: