You are not logged in.
Pages: 1
I'm getting AV in line
aClassType := GetClassParent(aClassType); -> access violation
in: function JSONObjectFromClass(aClassType: TClass; out aParser: PJSONCustomParser): TJSONObject;
my code:
IQueues = interface(IInvokable)
['{9857C187-68A2-4F22-823C-75B75F28B45A}']
function GetQueues(out response: TQueuesCollection): TResponse;
function WorkingHours(const MediaType: RawUTF8; out response: TQueuesWorkingHours): TResponse;
end;
TQueuesCollection = class(TInterfacedCollection)
protected
class function GetClass: TCollectionItemClass; override;
end;
Usage:
connector.ServiceDefine(IQueues, sicSingle).ResultAsJSONObjectWithoutResult := True;
var obj: IQueues;
var list: TQueuesCollection;
connector.Services.Resolve(IQueues, obj);
obj.GetQueues(list); -> access violation
Web request /queues.getqueues works fine.
Offline
There is not enough information here to understand what you did wrong.
Please don't post code in the thread - as stated by the forum rules.
Put some reproducible example in a linked gist page for instance.
Did you create the TQueuesCollection instance in the client code, before calling the method?
Offline
Thats right: https://www.dropbox.com/s/qyv1yxe1l00qi … e.txt?dl=0
Are you sure that storing source code samples in external services such as dropbox is a good solution? Those samples won't be available in the future if I remove dropbox file, so my solution won't be available for anyone. Why we can't put the good solutions in the forum, you don't provide such smart helpful code solutions in documentation so that forum is one of the best source sharing service IMHO.
Offline
Use Gist for posting code. It will stay available.
What you posted is not a reproducible example.
https://stackoverflow.com/help/minimal- … le-example
Offline
Pages: 1