tag:blogger.com,1999:blog-34454975.post8143131777312926645..comments2023-06-28T16:58:41.189+02:00Comments on Web Reflection: Ext JS - How to hack the JsonReaderAndrea Giammarchihttp://www.blogger.com/profile/16277820774810688474noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-34454975.post-4964648136828738402009-09-07T19:37:48.427+02:002009-09-07T19:37:48.427+02:00well, let's talk in few months ;)
V3 anyway so...well, let's talk in few months ;)<br />V3 anyway solved lot of of problems I had before, but not everythingAndrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-52140690746446677742009-09-07T19:24:13.569+02:002009-09-07T19:24:13.569+02:00To be fair, having spent a few days with at least ...To be fair, having spent a few days with at least a dozen of components, I haven't had any other issues like this (yet).<br /><br />Also, I've found a bit nicer solution for pre parsing json data by overriding the readRecords method:<br /><br />jsonReader.readRecords = function(obj){<br /> //dosomething()<br /> return this.constructor.prototype.readRecords.call(this, obj);<br />};Unknownhttps://www.blogger.com/profile/05372886901174135005noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-12955098489003423872009-09-02T23:31:17.369+02:002009-09-02T23:31:17.369+02:00Balázs Endrész, welcome into The Daily Ext JS WTF!...Balázs Endrész, welcome into <a href="http://webreflection.blogspot.com/2009/07/daily-ext-js-wtf.html" rel="nofollow">The Daily Ext JS WTF!</a> :DAndrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-15648327007745684952009-09-02T23:23:29.410+02:002009-09-02T23:23:29.410+02:00getJsonAccessor: function(){
var re = /[\[...getJsonAccessor: function(){<br /> var re = /[\[\.]/;<br /> return function(expr) {<br /> try {<br /> return(re.test(expr)) ?<br /> new Function("obj", "return obj." + expr) :<br /> function(obj){<br /> return obj[expr];<br /> };<br /> } catch(e){}<br /> return Ext.emptyFn;<br /> };<br /> }(),<br /><br /><br />So this is supposed to be a commercial product and this very basic feature is still not documented... and on my first day working with Ext I had to spend my time reading the source to find this. Also, the "clever" way they wrote it makes me wonder too: <br /><br /> * an unnecessary closure for referencing a regex used only once <br /> * a nice little try block to prevent the user finding bugs<br /> * and I can't even pass a simple function!Unknownhttps://www.blogger.com/profile/05372886901174135005noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-901736105612764062009-07-17T16:21:29.180+02:002009-07-17T16:21:29.180+02:00Thank You for pointing to thisThank You for pointing to thisKirillhttps://www.blogger.com/profile/17686578281189307024noreply@blogger.com