From: Ralph T. <ra...@gm...> - 2005-03-12 01:17:43
|
Hi there, I (think that I) want to add a new type to Adam. My program is MVC based, and the model is always instanciated from a string (a URL or serialized model). I understand that I could define a sheet like: sheet my_model { interface: name : ""; mime_type: ""; parent : ""; // will be the model's parent's serialized string ... }; and then bind widgets to @name or @mime_type (and write the glue code to hookup name, mime_type and parent to the model). What I'd really like to do is more like: sheet my_sheet { interface: my_model : "serialized-model-string"; }; and then bind widgets to @my_model.name or @my_model.mime_type. And perhaps even change the model string when a button is pressed (e.g.: make my_model = my_model.parent). Is this within the scope of Adam? It's not really important that my_model be a string and something else, it could just as easily be a special sheet (which my code can recognize and glue to a model factory). Best regards, Ralph |