Hey, Thanks for the feedback. I would have never thought of that but will keep it in mind for the next time. :) What tool did you use? Maybe if its wide spread its worth the effort to change the code. Regards, Martin
Am 23.11.2012 um 15:08 schrieb Raphael Schweikert - Vertec AG <[email protected]>: > Hi Martin, > > Yeah, I've figured that out as well. Before, I'd always wondered what these > lines were doing in my console. > > Strangely enough, the stack trace ends there: >> qx.log.Logger.trace:220 >> qx.log.Logger:334 > are the only two entries. > > However, I do think I've isolated the problem: > While digging, I've found that only one particular JS console in only one > particular browser was affected, which lead me to suspect that the culprit, > interestingly enough, was my JS inspector, the very same tool that I tried to > debug the problem with. > Apparently, my JS inspector tried to be very helpful and show me the values > of all the defined properties on known objects, which happened to include > this deprecated property. > > You could change the property to be non-enumerable to alleviate the issue. > Using: > Object.defineProperty(clazz, constant, { > get: function() { > self.warn( > "The constant '"+ constant + "' is deprecated: " + > (msg || "Please consult the API documentation for > alternatives.") > ); > self.trace(); > return constantValue; > }, > enumerable: false > }); > works fine. I do realise, however, that Object.defineProperty, while being > standard, isn't as widely supported as __defineGetter__ so you might not > think it worth the effort. > > Sincerely, > Raphael > >> Von: Martin Wittemann [mailto:[email protected]] >> Hey, >> Did you also check the implementation of the deprecatedConstantWarning [1]? >> It does not create the warning, it creates a getter which warns as soon as >> the constant is accessed. >> Also, I'm quite sure its not in the framework. I made a playground sample >> [2] and there is no warning when I use the class there. >> No matter where the piece of code is, it is interesting to know where. If >> its in the framework, I'm interested in it and if its in the application, >> your interested in it. ;) >> So could you do me the favor and put a debugger statement above line 330 of >> that mentioned logger class. In the stack trace, it should become clear >> which piece of code is accessing the constant. >> Oh, I have just seen that there should be a stacktrace on the console as >> soon as the warning appears. Is there one? >> Regards, >> Martin >> >> [1] >> https://github.com/qooxdoo/qooxdoo/blob/release_2_1/framework/source/class/qx/log/Logger.js#L321 >> [2] >> http://demo.qooxdoo.org/current/playground/#%7B%22code%22%3A%22qx.bom.element.Opacity.compile(0.5)%253B%250Aqx.bom.element.Opacity.get(document.body)%253B%250Aqx.bom.element.Opacity.set(document.body%252C%25201)%253B%22%2C%20%22mode%22%3A%22ria%22%7D > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
