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 DA395984C for ; Wed, 25 Apr 2012 07:59:37 +0000 (UTC) Received: (qmail 46479 invoked by uid 500); 25 Apr 2012 07:59:37 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 46277 invoked by uid 500); 25 Apr 2012 07:59:34 -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 46240 invoked by uid 99); 25 Apr 2012 07:59:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2012 07:59:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of olegsivokon@gmail.com designates 209.85.210.175 as permitted sender) Received: from [209.85.210.175] (HELO mail-iy0-f175.google.com) (209.85.210.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2012 07:59:26 +0000 Received: by iakk32 with SMTP id k32so221976iak.6 for ; Wed, 25 Apr 2012 00:59:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=UJjwptuNp34tr8Us5e6XPwjtRwBG/KgESQo1GDaxEgQ=; b=pZQyefMSpZfmW/clIVbTBUd4shLAiaQkZVOwFarFvVUjA/n3cZ9evZ5rbpg7pgJUzt TG0+QBFSyZqo6sQ9e1zG5+Jw4MOHjdHB6JKRJGR2wrtbGObT87W40oM++5U3xPFkVLKT NxyQSD/ZFS6WPmXXtTAdypn1FNni9x6FGKrVFmf7uA1boxBMNgo/vOVowzAzwhbIbWjO c4xWuPfPVyvwKE5l4V16dA6luMAYHGHjuZg+E5HGCnDXwMNan0v6sOjB0P7k9X0n18r5 1yj5V8o11iKrXUPmbHeE1qFsRrTf0pANfzino82HOuVgeauHJj6O+RZGYKdyNmzUlo/C YVnQ== MIME-Version: 1.0 Received: by 10.50.180.135 with SMTP id do7mr1134502igc.56.1335340746172; Wed, 25 Apr 2012 00:59:06 -0700 (PDT) Received: by 10.43.124.200 with HTTP; Wed, 25 Apr 2012 00:59:06 -0700 (PDT) In-Reply-To: References: <149F8129B58B2D418508E63117D9C5419B17A88EBB@nambx05.corp.adobe.com> Date: Wed, 25 Apr 2012 10:59:06 +0300 Message-ID: Subject: Re: [jira] [Updated] (FLEX-51) Please check support for ExactValue initializer From: Left Right To: flex-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=14dae9340c2dd467be04be7c3ece X-Virus-Checked: Checked by ClamAV on apache.org --14dae9340c2dd467be04be7c3ece Content-Type: text/plain; charset=ISO-8859-1 > Are you saying the compiler doesn't determine what the change events for > each token in the chain? That would definitely be "very far from reality". That is some different sort of parsing, it is not based strictly on AS3 grammar, it doesn't contribute to the parse tree generation in the end. In order to generate parse tree you need to know everything about the lexical environment you are adding a node to, at that point compiler cannot possibly know it because the AS3 code that is a part of the environment is not yet generated. In other words, parse trees are generated on the way from AS3 to bytecode, not on the way from MXML to AS3. Below is an example, which illustrates some cases when parsing of the binding will fail to determine what change events it should listen to: package actionscript { import flash.display.BlendMode; import flash.events.Event; import flash.events.EventDispatcher; import flash.events.IEventDispatcher; import flash.utils.describeType; import mx.events.PropertyChangeEvent; public class BindingChecker extends EventDispatcher { [Bindable("propertyChange")] public function get mode():String { // this getter is called only once, when component is set up, but never again trace("updating binding"); return this._newMode; } private var _oldMode:String; private var _newMode:String; private var _modes:Array; public function BindingChecker(target:IEventDispatcher = null) { super(target); this._newMode = this.getMode(); super.addEventListener(Event.ENTER_FRAME, this.enterFrameHandler); } private function enterFrameHandler(event:Event):void { this._oldMode = this._newMode; this._newMode = this.getMode(); super.dispatchEvent( PropertyChangeEvent.createUpdateEvent( this, "mode", this._oldMode, this._newMode)); } private function getMode():String { if (!this._modes) { this._modes = []; for each (var mode:XML in describeType(BlendMode).constant.@name) this._modes.push(BlendMode[mode.toString()]); } return this._modes[int(Math.random() * this._modes.length)]; } } } ==== using it ==== But it is not limited to this situation. Best. Oleg --14dae9340c2dd467be04be7c3ece--