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 474A5917D for ; Sun, 26 Feb 2012 18:43:54 +0000 (UTC) Received: (qmail 27600 invoked by uid 500); 26 Feb 2012 18:43:53 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 27569 invoked by uid 500); 26 Feb 2012 18:43:53 -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 27561 invoked by uid 99); 26 Feb 2012 18:43:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Feb 2012 18:43:53 +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 (nike.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; Sun, 26 Feb 2012 18:43:45 +0000 Received: by iaby12 with SMTP id y12so5653197iab.6 for ; Sun, 26 Feb 2012 10:43:24 -0800 (PST) Received-SPF: pass (google.com: domain of olegsivokon@gmail.com designates 10.50.161.196 as permitted sender) client-ip=10.50.161.196; Authentication-Results: mr.google.com; spf=pass (google.com: domain of olegsivokon@gmail.com designates 10.50.161.196 as permitted sender) smtp.mail=olegsivokon@gmail.com; dkim=pass header.i=olegsivokon@gmail.com Received: from mr.google.com ([10.50.161.196]) by 10.50.161.196 with SMTP id xu4mr13802490igb.11.1330281804647 (num_hops = 1); Sun, 26 Feb 2012 10:43:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=UobDs3B0na7m+7jpf06HfzcoCB15Rpvkreu/FVQwTVE=; b=kSe5wUm9xgRq0o+R4gTyIQ8taKFawDZGfNZi7Sv5w2AiQJwuKspnHYQITqVsZ1mUEB 8m0/7LPds8HVT1v8btjdyR3jHG+gX4WrkuugNob1xTuG1LFD7YYtMPQ22rdt1blDylxe zT2TEOoOK7z4Er6Fr77ku9C3qfULHZZ8CprmU= MIME-Version: 1.0 Received: by 10.50.161.196 with SMTP id xu4mr11177677igb.11.1330281804561; Sun, 26 Feb 2012 10:43:24 -0800 (PST) Received: by 10.42.224.132 with HTTP; Sun, 26 Feb 2012 10:43:24 -0800 (PST) In-Reply-To: References: Date: Sun, 26 Feb 2012 20:43:24 +0200 Message-ID: Subject: Re: Compiler Array Implementation ( was Adobe / Apache / Spoon Flex Tour ) From: Left Right To: flex-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=14dae934051b697b0c04b9e25ea6 X-Virus-Checked: Checked by ClamAV on apache.org --14dae934051b697b0c04b9e25ea6 Content-Type: text/plain; charset=ISO-8859-1 I've explained how that could be avoided in a more generic way in the end of the paragraph - why cannot that be a solution? It's ultimately the same mechanism, as you would add event handlers, actually. If you think about old MXMLC code, you could even use the part that generated event handlers to do that. The benefit would be that: 1. You can later override this behavior by providing your own implementation of a function that generates child components. 2. Much easier to use, when creating same components w/o MXML. This is not entirely a foreign concept - all sorts of labelFunction's and itemRendererFunction's work in a similar way. Imagine something like this: // compare to this._dispatcher.addEventListener("eventType", this.eventHandler); ? . . . this._navigator.addTab("tabTitle", this.makeTab); . . . protected function makeTab(title:String):Tab { var tab:Tab = new Tab(title); tab.setStyle("whatever", doesnt, matter); return tab; } Not ideal, but no additional objects are created + more experienced developers would be able to provide makeTab() implementation which can be smarter (same function for multiple tabs / generate content based on data). The makeTab() function may be identified through [DefaultProperty] metadata, for example. The generated "descriptor" on the other hand, is not reusable, it's just some amorphous chunk of data. Of course, it never was a good idea to extend MXML components, but this is not a requirement, given normal code generation, this limitation can be lifted. Best. wvxvw --14dae934051b697b0c04b9e25ea6--