>
> auto lst = context.getResults.initAccounts(1);
fixed my issue, thanks.
On Sunday, November 4, 2018 at 9:52:31 PM UTC+3:30, Kenton Varda wrote:
>
> This line:
>
> auto lst = capnp::List< capnp::Text>::Builder();
>
> is basically constructing `lst` to be a null pointer. So when you
This line:
auto lst = capnp::List< capnp::Text>::Builder();
is basically constructing `lst` to be a null pointer. So when you try to
set a value through it, you get an exception (or a segfault).
Try this:
auto lst = context.getResults.initAccounts(1);
lst.set(0, "reza");
(The 1 is
Quoting r.a.m...@gmail.com (2018-11-04 12:58:16)
> interface AccountManager {
> echo @0 (title: Text) -> (result: Text);
> list @1 ()-> (accounts : List(Text));
> # get @1 (title: Text) -> (account: Account);
> }
This looks fine.
>also I use following code for my server
Hi, I'm looking for a way to initialize a List as result of interface
method. here is my interface design:
interface AccountManager {
echo @0 (title: Text) -> (result: Text);
list @1 ()-> (accounts : List(Text));
# get @1 (title: Text) -> (account: Account);
}
also I use fo