Abderrahim Kitouni <[email protected]>
writes:

> Hello,
>
> 2011/10/13 bsquared <[email protected]>:
>>
>> I am guessing that I'm going about this wrong, but I want to populate a list
>> from a static method.
>>
>>     static void populate_list (ref SList<string> list) {
>>            list.append("");
>>     }
>>
>> I am getting a compiler error:
>> error: Cannot capture reference or output parameter
>
> The above compiles without problems for me (valac 0.14.0). This error
> probably means that you are trying to use this variable from a lambda
> expression.
>
> Another solution is to use libgee: libgee's lists are objects and
> don't need any special treatment (just pass them normally and you can
> call list.add with no problems)
>
> HTH,
> Abderrahim
> _______________________________________________
> vala-list mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/vala-list

Yes that does help.  I was attempting to use from with a lambda.  Thank you.
-- 
Regards,
Brian Winfrey

_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to