In my modified grid, I added the following in makeCellsAndColumns():

...
initArgs.needsSetRegularColor = this.bgcolor0 != null ||
                               this.bgcolor1 != null;

// Beginning of stuff I added.
// ---
// In order to re-populate the table, I need to first clear out all
// the stuff currently there, which is just the replicated
// basegridrows. I admit I'm not entirely sure how the replicator
// performs its magic, and I'm not sure what objects actually exist
// under rowparent at this point and what their relationship is to one
// another, so I simply blow everything away in an attempt
// to restore what I see originally in the XML under rowparent (i.e.,
// nothing). This doesn't get executed the first time through, as
// rowparent is empty.

if (content.rowparent['replicator']) {
 // wipe out all the rows
 while (content.rowparent.subviews.length > 0) {
   Debug.write('destroying something; subviews now',
               content.rowparent.subviews);
   content.rowparent.subviews[0].destroy();
 }
 // wipe out replicator itself (it's not part of subviews)
 Debug.write('destroying replicator');
 content.rowparent.replicator.destroy(); // <-- ERROR HERE
}

// End of stuff I added

var r = new _rowclass ( content.rowparent , initArgs, cells , true );

// small change here, shouldn't matter
var realpath = this.contentdatapath + ( this.usefirstasheader ?
                                       '[2-]' : '' );
new LzDatapath( r , { replication : "lazy" ,
                     xpath : realpath,
                     spacing : this.spacing } );
...

Now, things works fine in Flash. However, in DHTML, if I change the
dataset's columns so as to trigger re-execution this code, I get an
error on the line I labeled above. The error is:

ERROR: http://localhost:8080/lps-4.0.2/lps/includes/lfc/LFCdhtml-debug.js:12699:
this.__LZdepChildren has no properties

This one really has me stumped. 'replicator' seems to exist, yet I'm
not able to remove it. I have no idea what this error message is
talking about, and the source it's referring me to is indecipherable
(I'm guessing it's generated from the lfc sources in subversion). Any
help?

Thanks,

Yang

Reply via email to