Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5B7C1DA30 for ; Mon, 9 Jul 2012 21:54:33 +0000 (UTC) Received: (qmail 55262 invoked by uid 500); 9 Jul 2012 21:54:32 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 55229 invoked by uid 500); 9 Jul 2012 21:54:32 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 55218 invoked by uid 99); 9 Jul 2012 21:54:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2012 21:54:32 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of omuppi1@gmail.com designates 209.85.217.175 as permitted sender) Received: from [209.85.217.175] (HELO mail-lb0-f175.google.com) (209.85.217.175) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2012 21:54:26 +0000 Received: by lbol5 with SMTP id l5so2059625lbo.6 for ; Mon, 09 Jul 2012 14:54:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=dvU+iUtHbvGAKS1tMifVM1V2J577vzrXQmEAwcZ2D9U=; b=JSw0nvhAAtDViaMNNOgNVweLzz4kOX3KbXnX7S8wAMGQ32a9yTxeeq8M7v+Er3ewjM bWe166DMqCcyBSRzdsXmYnZqNUrrACoWs3tHxSJ5Rl/qV/LmdRf+q99+Rq523aq625SO 4keiibI7yEovvE0b6uQRxSSSb/lGOZtOZDK3cx9fPW+Bm5NHw6R5DEz3OmIIsyDDupbR OItQBRlMKmB2kEfe3NSneArYBtYR+S5mVDt9Vn+EYed1pVd2ek7uY1XkYWCwS5SSB+s2 noPwtudp8jX8XMviega1fGaeSSEqS5ZvZvc6PhTDBdwa4hMxTBxh2hBvWTS/WG+Jz5WG Rvng== Received: by 10.152.102.137 with SMTP id fo9mr42547268lab.35.1341870845944; Mon, 09 Jul 2012 14:54:05 -0700 (PDT) MIME-Version: 1.0 Sender: omuppi1@gmail.com Received: by 10.112.82.73 with HTTP; Mon, 9 Jul 2012 14:53:35 -0700 (PDT) In-Reply-To: References: <727F0008-6215-47ED-BB40-F98C5720E7A3@classsoftware.com> From: Om Date: Mon, 9 Jul 2012 14:53:35 -0700 X-Google-Sender-Auth: 3jZsPW124Udhv-SwM_ILUoNOcZQ Message-ID: Subject: Re: Odd undefined property via reference to static type compilation error To: flex-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=f46d0407160b1b629904c46ca7f5 --f46d0407160b1b629904c46ca7f5 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Jul 9, 2012 at 2:40 PM, Jeff Dyer wrote: > This is probably a compiler bug, if not a language bug. Instance > initializers were ill defined in AS3. In the draft ES4 spec we pinned them > down to be scoped to the class static scope, so references to 'this' or > instance variables would not be resolved in instance initializers. That > said, AS3 did allow them with some what vague initialization semantics. The > bug here is that 'this' is not allowed in instance initializers in strict > mode. > > There are two workarounds: 1/erase the 'this.' prefix; 2/turn off strict > mode. > > Jeff > > > Thanks for explanation, Jeff. Interestingly, this["minHeight"] seems to work fine in the instance initializer, even in strict mode. > > On Mon, Jul 9, 2012 at 11:34 AM, Ryan Frishberg wrote: > > > In ActionScript, it looks like this doesn't work: > > > > class A > > { > > > > public var minHeight:Number = 9; > > > > protected var minHeight2:Number = this.minHeight; > > > > } > > > > Someone who knows ActionScript in more detail can probably explain why > the > > compilter/runtime can't figure out what "this" should refer to when > > initializing class properties. > > > > -Ryan > > > > On Wed, Jul 4, 2012 at 5:53 PM, Justin Mclean > >wrote: > > > > > Hi, > > > > > > > BTW, is this an issue in Adobe Flex 4.6 as well? > > > Yep issue with both 4.6 and 4.8 and couldn't find an existing JIRA > report > > > for it. > > > > > > Justin > > > --f46d0407160b1b629904c46ca7f5--