Return-Path: X-Original-To: apmail-flex-dev-archive@www.apache.org Delivered-To: apmail-flex-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E829618E31 for ; Thu, 25 Jun 2015 17:23:37 +0000 (UTC) Received: (qmail 78742 invoked by uid 500); 25 Jun 2015 17:23:37 -0000 Delivered-To: apmail-flex-dev-archive@flex.apache.org Received: (qmail 78712 invoked by uid 500); 25 Jun 2015 17:23:37 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 78701 invoked by uid 99); 25 Jun 2015 17:23:37 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2015 17:23:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E8DECD03B6 for ; Thu, 25 Jun 2015 17:23:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.429 X-Spam-Level: X-Spam-Status: No, score=-1.429 tagged_above=-999 required=6.31 tests=[RCVD_IN_MSPIKE_H2=-0.001, RP_MATCHES_RCVD=-1.429, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id FdXYthG5ZHW3 for ; Thu, 25 Jun 2015 17:23:17 +0000 (UTC) Received: from DUB004-OMC4S1.hotmail.com (dub004-omc4s1.hotmail.com [157.55.2.76]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 261C727603 for ; Thu, 25 Jun 2015 17:23:17 +0000 (UTC) Received: from DUB118-W46 ([157.55.2.73]) by DUB004-OMC4S1.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Thu, 25 Jun 2015 10:23:09 -0700 X-TMN: [mWggHKslUHuRqiSI+0RJ02nAFM2Jg5Wf] X-Originating-Email: [webdoublefx@hotmail.com] Message-ID: From: =?Windows-1252?B?RnLpZOlyaWMgVEhPTUFT?= To: "dev@flex.apache.org" Subject: RE: [FalconJX FlexJS] JQuery up and running, a nightmare but we now have 1.9 in AS Date: Thu, 25 Jun 2015 18:23:09 +0100 Importance: Normal In-Reply-To: References: , , , , , , , , , , , ,<000f4262.2d97bf597f05e927@adobe.com> , , , , Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 25 Jun 2015 17:23:09.0815 (UTC) FILETIME=[9B739870:01D0AF6B] > As our JS output is basically immutable=2C I think these discussions are= =0A= > missing the point and feel like trying to second guess the machine=0A= > code/assembly that this JS basically is.=0A= =0A= In What language=2C the debugging and the tests are supposed to be done=2C = AS3 or JS ?=0A= =0A= > When properly annotated=2C the GCC warns or throws an error if the code s= eems=0A= > to access 'privileged' members=2C but I'd guess that the AS compiler does= the=0A= > same=2C so why worry?=0A= =0A= /**=0A= =A0* @private=0A= =A0*/=0A= Main.prototype.start =3D function() {=0A= =A0 HtmlContainer.load([Main.JQUERY_SCRIPT]=2C Main.run)=3B=0A= }=3B=0A= =0A= This is called without any Error from the html: new Main().start()=3B=0A= =0A= Do you know why it doesn't work for my private start() ?=0A= =0A= What about protected methods ? can myClassExtendsObjectInstance["myProtecte= dMethodFromClassA"]() is supposed throw an Error ?=0A= =0A= Fr=E9d=E9ric THOMAS=0A= =0A= =0A= ----------------------------------------=0A= > From: erik@ixsoftware.nl=0A= > Date: Thu=2C 25 Jun 2015 18:59:00 +0200=0A= > Subject: Re: [FalconJX FlexJS] JQuery up and running=2C a nightmare but w= e now have 1.9 in AS=0A= > To: dev@flex.apache.org=0A= >=0A= > Yeah=2C but that is a very=2C very different design pattern and would req= uire=0A= > substantial work on the transpiler to make that output possible. It would= =0A= > also=2C I believe=2C be incompatible with the way the GCC optimizes (not= =0A= > minimize=2C mind you) the code=2C so that advantage would be lost as well= .=0A= >=0A= > As our JS output is basically immutable=2C I think these discussions are= =0A= > missing the point and feel like trying to second guess the machine=0A= > code/assembly that this JS basically is.=0A= >=0A= > When properly annotated=2C the GCC warns or throws an error if the code s= eems=0A= > to access 'privileged' members=2C but I'd guess that the AS compiler does= the=0A= > same=2C so why worry?=0A= >=0A= > EdB=0A= >=0A= >=0A= >=0A= > On Thu=2C Jun 25=2C 2015 at 5:45 PM=2C OmPrakash Muppirala =0A= > wrote:=0A= >=0A= >> On Jun 25=2C 2015 8:07 AM=2C "Alex Harui" wrote:=0A= >>>=0A= >>>=0A= >>>=0A= >>> On 6/25/15=2C 8:02 AM=2C "Fr=E9d=E9ric THOMAS" wrote:=0A= >>>=0A= >>>>> Ah ok. That=92s probably a bug. Not sure why=2C but the emitters curr= ently=0A= >>>>> initialize private members in the constructor. We discussed on some= =0A= >>>>>other=0A= >>>>> thread a while back that this shouldn=92t be necessary except for=0A= >>>>>non-scalar=0A= >>>>> initializers=2C so probably we should try to change this someday.=0A= >>>>=0A= >>>>Initializing methods in the constructor via myPrivateMethod =3D functio= n()=0A= >>>>{) will make it private but public instance methods not initialized in= =0A= >>>>the constructor won't be able to access it=2C public methods which aim = to=0A= >>>>access private methods need also to be declared in the contructor (eg.= =0A= >>>>"this.myPublicMethod =3D function() {return myPrivateMethod())")=0A= >>>=0A= >>> Really? I wasn=92t aware of that. I didn=92t think JS had any access=0A= >>> protection at all.=0A= >>>=0A= >>>>=0A= >>>>But do we need to replicate the AS3 NS behaviour in JS (public=2C priva= te=2C=0A= >>>>protected=2C custom NS) ?=0A= >>>>=0A= >>>>Has it been already discussed ?=0A= >>>>=0A= >>>>I'm not sure=2C my first answer would be no as the the developer will= =0A= >>>>develop in AS3 but if the code to be tested is the JS=2C I would answer= =0A= >>>>yes=2C we must reproduce what AS3 promises=2C the public=2C protected= =2C private=0A= >>>>and custom NS for classes and instances.=0A= >>>=0A= >>> I thought everything in JS was effectively public=2C that there was no= =0A= >>> access protection. But we are currently using Google Closure Compiler t= o=0A= >>> minify all of the JS (and will probably always have a way for folks to= =0A= >>> choose to use it) and I think Erik says that proper use of @private hel= ps=0A= >>> the minifier.=0A= >>>=0A= >>> I=92m not sure how we=92d handle custom namespaces.=0A= >>>=0A= >>> -Alex=0A= >>>=0A= >>=0A= >> In Javascript we can create public=2C private and privileged variables= =2C=0A= >> using closures.=0A= >>=0A= >> http://javascript.crockford.com/private.html=0A= >>=0A= >> Thanks=2C=0A= >> Om=0A= >>=0A= >=0A= >=0A= >=0A= > --=0A= > Ix Multimedia Software=0A= >=0A= > Jan Luykenstraat 27=0A= > 3521 VB Utrecht=0A= >=0A= > T. 06-51952295=0A= > I. www.ixsoftware.nl=0A= =