Loading ...
Sorry, an error occurred while loading the content.

Re: Datatable deleteRows clone issue

Expand Messages
  • jennykhan
    You re right -- it s an inefficiency that should be addressed in a future release. Please file a bug in SourceForge so it doesn t slip through the cracks.
    Message 1 of 5 , Dec 1, 2008
      You're right -- it's an inefficiency that should be addressed in a
      future release. Please file a bug in SourceForge so it doesn't slip
      through the cracks.


      --- In ydn-javascript@yahoogroups.com, "Mark Curtis" <markcuk@...>
      > Hi Jenny,
      > I don't have a URL to the application because my development is
      all internal
      > right now, but basically what I'm doing is creating a tooltip
      widget in my
      > custom formatter and appending that tooltip object to the oData
      > Because of this the clone method is trying to clone the tooltip
      widget along
      > with the data and because of the circular references in tooltip it
      > causing an infinite loop. The thing I'm actually confused about
      though is
      > why the clone method needs to be called when rows are being
      deleted from the
      > recordset. I understand that it is used for creating copies of
      the data to
      > use when doing things like firing custom events, but in the case
      of deleting
      > rows why can't we just use the existing data objects instead of
      > clones since they're not being used by anything else anymore?
      > Thanks!
      > -Mark
      > On Wed, Oct 22, 2008 at 7:36 PM, jennykhan <jennyhan@...> wrote:
      > > Hi Mark,
      > >
      > > In general, we use _cloneObject() on object literals of data to
      > > preserve their state for later use (generally for firing Custom
      > > Events) while being able to update the underlying data. The
      > > data is expected to be a known JS type, such as String, Number,
      > > etc, but not something like a function or a widget instance. I'm
      > > sure where you'd be getting the infinite loop, so posting a URL
      to the
      > > repro case would be helpful to debugging the problem.
      > >
      > > Regards,
      > > Jenny
      > >
      > >
      > > --- In ydn-javascript@yahoogroups.com <ydn-javascript%
      > > "Mark" <markcuk@> wrote:
      > > >
      > > > I'm in the process of upgrading to YUI 2.6 and I started having
      > > issues
      > > > when deleting rows. I've traced the problem to the clone
      method that
      > > > is called when rows are deleted from the recordset. I have
      > > > YUI tooltips to some of my cells in my datatable and because
      of this
      > > > the clone method goes into an infinite loop. What I'm really
      > > > about though is why the clone method is needed at all. What is
      > > > reason for cloning the rows when we can just use the original
      > > objects?
      > > > I don't see the difference here other than unnecessary
      > > >
      > >
      > >
      > >
    Your message has been successfully submitted and would be delivered to recipients shortly.