libqtlua-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libqtlua-list] Iterating over a UserData object


From: Nenad Lakinski
Subject: Re: [Libqtlua-list] Iterating over a UserData object
Date: Sat, 2 Apr 2016 12:38:55 -0700

Hi Alexandre,

each() did the trick. Somehow with all my experimentation I must have gotten something misconfigured, so it didn't work before.

I got it working now with my own Userdata class and Iterator. list() works with it as well.

Thank you for your help.


-neno

On Sat, Apr 2, 2016 at 7:04 AM, Alexandre Becoulet <address@hidden> wrote:
On Fri, 01 Apr 2016 16:49:55 +0200,
Nenad Lakinski wrote:

Hello,

> However for some reason I can't use this userdata object for iteration. When I try with ipairs/pairs I get an error message saying that the object
> must be a table. When I try with each/list it treats the UserData object as empty.

You have to use each().

> I'm wondering if I'm missing something here. I went over all the other UserData classes in the codebase (e.g. the proxies) and I can't see any
> difference between those and my class.

Please have a look to:

  examples/cpp/userdata/userobject2.cc

Does it help?

--
Alexandre


reply via email to

[Prev in Thread] Current Thread [Next in Thread]