/**
 * Created by CSL on 2017-05-19.
 * 用于展示未知对象的内容。如：debug.m(GC.Spread.Sheets.Events);
 */

debug = {
    m: function (flag, obj) {
        alert(flag + this.objStr(obj));
    },

    d: function (flag, obj) {
        alert(flag + JSON.stringify(obj));
    },

    objStr: function (obj) {
        var str = "";
        var spr = "";
        for (var x in obj) {
            if (obj.hasOwnProperty(x)) {
                if (str == '') {
                    spr = ''
                } else { spr = ', ' } ;
                str += spr + x + ':' + obj[x];
            }
        }
        return str;
    }
}