lua-users home
lua-l archive

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

On Friday, September 13, 2013, Marc Lepage wrote:

So, in that context, any suggestions? Some way to automate the hook ups or the actual update of objects referring to objects when the referred objects change? (Or their properties?)

It seems ridiculously simplistic, given what your were contemplating, but why wouldn't this work:

A  shadow table holds the values of your model objects. 

__newindex fires every time model updates. 

After shadow is updated, one or more coroutines / callbacks in a subscribe table are called. 

Am I off base or missing something?