On May 18, 2:47 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote: > Thats quite interesting stuff. Some things of my mind: > Use the metadata plugin to specify and read metadata. > It would be nice if the textarea with the serialized model data could be > edited. Once you change something, the form is updated accordingly. > I'd like to see an example that updates the model after I changed one > select, submits it (or parts of it), receives an updated model from the > server and updates a different select accordingly. Seems like that is > something that should be quite easy to achieve with your plugin. > I've never seen "if ('console' in window && 'log' in console)" before, I > like that. Is there any difference to "if ( window.console && > console.log )", assuming that both objects never default to false if > present? > > For access to subversion you should contact John directly ( > [EMAIL PROTECTED] ).
I used to have functions to initialise the model from various JSON sources, but before releasing I made the decision to deliberately leave out any initialisation and serialisation of the data model - there are so many possibilities it would be monsterous to include them all. The textarea was purely a way of viewing the model data as it changes, that's why it's readonly. It's an interesting idea though - I may give it a go. I still need to produce a few more demos, the current one doesn't really do it justice. There is the possibility of highly customised widgets too by plonking .modelSetValue() and .modelGetValue() onto elements, and also using 'update' events. As for the console thing, I always use ('property' in object) to check for existence of a property. To be honest I've never really considered whether it is any different from (object.property), anyone care to shed light on the matter?