Hello, I'm brand new to Mochikit, and i've spent several hours reading through the code, documentation, demos... everything I can get my hands on, and I'm trying to get a grip on the recommended way to port across some custom Javascript objects I already had written.
Given objects written like this: function myObject1(){ this.iProperty1 = -1; this.sProperty2 = ""; this.myObject2Array = new Array(); this.myObject3Array = new Array(); this.Populate = function(prop1,prop2){ this.iProperty1=prop1;this.sProperty2=prop2; } this.Parse = function(str){ /* complex loop through delimited string that parses a predetermined format and assigns the properties, as well as adds items to the object arrays, calling the other objects' parse functions*/ } function myObject2(){ this.prop1 = ""; this.prop2 = -1; this.Populate = function(prop1,prop2){ this.prop1=prop1;this.prop2=prop2; } this.Parse = function(str){ /*more regex parsing - fills properties*/ } } function myObject3(){ this.prop1 = ""; this.prop2 = -1; this.Populate = function(prop1,prop2){ this.prop1=prop1;this.prop2=prop2; } this.Parse = function(str){ /*more regex parsing - fills properties*/ } } What would be the recommended way to port this into usable code in Mochikit, given the following: - The object2 array will always have 6 elements, however some of these may be "null" objects... order doesn't matter, but they should be easily editable. - The object3 array will be represented in a Mochikit.Sortable list, with "add" and "delete" functions, and all re-arrangements of order must be tracked - Changes in any of the above objects will make constant updates to the DOM of the page - Multiple copies of the parent object (myObject1) will be needed... what is the preferred Mochikit method for storing these? - each instance of myObject3 will reference another custom object type (omitted for brevity's sake). These objects ("myObject4" ?), however, will be collected in a seperate "global" list, and may be shared amongst multiple myObject3 instances, both in the same myObject1 and in other myObject1 instances. If you can offer any advice, I'd appreciate it greatly. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~----------~----~----~----~------~----~------~--~---