lua-users home
lua-l archive

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


> I was referring to the udata2 object from your example (see above)
> which have a serialize method.

Looks like my generic names have confused things.  Udata2 has a
serialize method but it's not a serializer.  The idea I had from your
last email was to create a serializer object at some point to enforce
the collection rules in addition to having objects with such a method
that would call into it.  Anyway, it was a random thought, but oneI
hadn't considered.


> In your original example, both userdata are created with the same
> module, and swapping their creation order solves the problem. Can you
> give an example of code using multiple modules that still have issues
> ?

I'm not sure that I explicitly said this, but in fact Udata1 comes
from one module and Udata2 comes from another and in general Udata1 is
created before Udata2.  Also, Udata1 is all but guaranteed to be
created before Udata2 but regardless, I have no control of the order
in which things area created so I can't rely on that and I don't want
to impose such a rule on the end user.  Instead, I'd like to find a
way to handle it behind the scenes.

wes