View Single Post
10-05-05, 07:01 AM   #2
Littlejohn
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 90
You're trying to save a property on an object without saving the entire object?

Just save the top-level object and all nested objects will be saved. If this is inefficient (for example too many transient state values will be saved) the normal solution is to separate the persistant state into an object and then save that. This object can have nested tables that mirror the nesting in other parts of your code. You can use Lua's meta-table feature to bind the persistant and transient objects together.

You might also be trying to build a monolithic add-on. Do you really need extensive nesting? Can you refactor your code into several add-ons with a flatter namespace?
  Reply With Quote