Changes between Initial Version and Version 1 of Ticket #11756


Ignore:
Timestamp:
Sep 19, 2010, 7:44:54 PM (9 years ago)
Author:
Eugene Lazutkin
Comment:

It cannot be fixed. In general dojo.clone() works only on primitive types and naked objects. To clone proper objects made with dojo.clone() you should provide a cloning constructor, or (most probably) a special method, which does exactly that --- creates a clone of itself.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11756

    • Property Owner changed from anonymous to Eugene Lazutkin
    • Property Status changed from new to assigned
  • Ticket #11756 – Description

    initial v1  
    11The example will make it clear
    22
     3{{{
     4#!js
    35dojo.declare('ani', null, {
    46    constructor: function(param){
     
    911var nomind = new ani('anirban');
    1012dojo.clone(nomind);
     13}}}
    1114
    12 throws out error TypeError: Result of expression 'param' [undefined] is not an object.
     15throws out error `TypeError: Result of expression 'param' [undefined] is not an object`.
    1316
    1417Don't know if the bug can possibly be fixed but at least a more meaningful error can be thrown.