Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5CA2D200BE2 for ; Thu, 15 Dec 2016 19:18:45 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 597A2160B15; Thu, 15 Dec 2016 18:18:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 78DA1160B13 for ; Thu, 15 Dec 2016 19:18:44 +0100 (CET) Received: (qmail 28793 invoked by uid 500); 15 Dec 2016 18:18:43 -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 28777 invoked by uid 99); 15 Dec 2016 18:18:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Dec 2016 18:18:43 +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 CFCC5C6626 for ; Thu, 15 Dec 2016 18:18:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.103 X-Spam-Level: X-Spam-Status: No, score=-0.103 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=adobe.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 9XbGH3ScDQ-u for ; Thu, 15 Dec 2016 18:18:41 +0000 (UTC) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0053.outbound.protection.outlook.com [104.47.36.53]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 230D95F5F8 for ; Thu, 15 Dec 2016 18:18:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adobe.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=kJqUh2B2QZaQt+P6grKGaSZaugAYhMpcfJu8wbbn4fY=; b=JLTn/DHCAth+HKqb+ek6+EO1ch1ossasKnJQ3cenwvHyJAFvo09HHuy6+IYA9cTGIaedTOBV0dyIaY8yl7r5lHNRavs33qBH4DhNz/uB09CjUCWuazGe59e4j08cn6PRqSzKy2XUUgtb3qHN1qcrlQNQzguuPjy/F4/01NPjEgw= Received: from BN6PR02MB2804.namprd02.prod.outlook.com (10.175.96.15) by BN6PR02MB2802.namprd02.prod.outlook.com (10.175.96.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.771.8; Thu, 15 Dec 2016 18:17:55 +0000 Received: from BN6PR02MB2804.namprd02.prod.outlook.com ([10.175.96.15]) by BN6PR02MB2804.namprd02.prod.outlook.com ([10.175.96.15]) with mapi id 15.01.0771.014; Thu, 15 Dec 2016 18:17:55 +0000 From: Peter Ent To: "dev@flex.apache.org" Subject: Re: [FlexJS] About Component Cycle and Events Thread-Topic: [FlexJS] About Component Cycle and Events Thread-Index: AQHSU4hB4tI00OvOiEG4A4EIYC6yfKEDPR6AgAMnloD//6CDgIABjc6AgAA5sID//4PTAIAAsJOAgABz9gCAABu99YAAABZBgAASD4CAAAjdAIAAODkAgABnfoD//7iwgA== Date: Thu, 15 Dec 2016 18:17:55 +0000 Message-ID: References: <1481740977732-57258.post@n4.nabble.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.7.0.161029 authentication-results: spf=none (sender IP is ) smtp.mailfrom=pent@adobe.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [24.98.132.247] x-ms-office365-filtering-correlation-id: 6f8ab466-9f59-4910-9f10-08d42516b136 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR02MB2802; x-microsoft-exchange-diagnostics: 1;BN6PR02MB2802;7:+0jC6f6MtNQVmF0OJ+jBdpnQcwJXLw3t6QkG5wT12Ctpt7IDBDdWeuGvXEo97gkrv8sV1BlfThH8meo7VM10zgJMsH4qrA/ssNrXwoDNy+TtUFf1Xwm09LJUJ+inCMbXMwug7+Jh0BD7QZBOQn7v+518EvwrQxQKp7RBH5isassWjuuML+gfz3vLLA7IATyMeUoi1KM3l0aA+3zoYvMY029j2ouOc3GMJ9LiCaVeQVDLUMfwUb7cj5BsQcwkmENpxJOxMNCutCtb3e6XaCX0KMJ07BHfSZqu+faogr65/SgwFGw66XkWzQzlhzbc+xMCNPo+LFR8MHgybGhl3ifk5OdbIvA1raNWR/mbq3FxBINps87pK86YixgRq0Bz4NMxc+d67/LnrF5xSTVNboobHHXOZxEIGO+2SfUNPEu4Yq8ABOrZ9kzsz6nUzxHeK6oNlc4jqMoHgLCxJc1hiKiUiQ==;20:UIv5FhVXiu9uHWpLUoIwjYTznmvrdipbV8bofESFbBI7u6p1CsbNaiq2ZNCkRBiJqtvLzVCwAmoUzT5oJRq7NiGtI88zZnuGU/5KIgmuVGSCrhWjFe48FZ2jJftMNosb0Gvg/+ORUBXNNyp/usKzNiYM0CLuwy1UvrVvMBKkMus= x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148);SRVR:BN6PR02MB2802;BCL:0;PCL:0;RULEID:;SRVR:BN6PR02MB2802; x-forefront-prvs: 0157DEB61B x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39850400002)(39410400002)(39450400003)(39840400002)(39860400002)(377454003)(24454002)(189002)(199003)(105586002)(106356001)(86362001)(106116001)(6436002)(101416001)(38730400001)(54356999)(229853002)(6506006)(36756003)(6512006)(99286002)(6486002)(76176999)(110136003)(25786008)(3280700002)(97736004)(2950100002)(122556002)(50986999)(10090500001)(6916009)(3660700001)(81166006)(4001350100001)(8936002)(83506001)(81156014)(8676002)(5660300001)(2900100001)(1730700003)(450100001)(92566002)(2906002)(77096006)(107886002)(189998001)(2351001)(68736007)(93886004)(3846002)(305945005)(66066001)(7736002)(2501003)(102836003)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR02MB2802;H:BN6PR02MB2804.namprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: adobe.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-2" Content-ID: <9E9BA49D34697B4499F54703C8BF3C35@namprd02.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: adobe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2016 18:17:55.6105 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fa7b1b5a-7b34-4387-94ae-d2c178decee1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR02MB2802 archived-at: Thu, 15 Dec 2016 18:18:45 -0000 On 12/15/16, 12:33 PM, "Alex Harui" wrote: > > >On 12/15/16, 8:22 AM, "Peter Ent" wrote: > >>Having done a bunch of these, I'd like to propose something a little >>controversial.=20 >> >>A new class, BaseBead, from which all Beads derive (you can choose not to >>do this in your custom beads, just implement IBead). BaseBead has: >> >>public function set strand(value:IStrand):void {=A9} >>public function get strand():IStrand {=A9} >> >>public function strandReady():void >>- your bead class overrides strandReady() which is called by the strand >>setter function and in your override you set up your bead. If your bead >>needs to be aware of other beads, override the next function: >> >>public function beadsLoaded():void >>- your bead class, if it needs to, overrides beadsLoaded() and completes >>it set up. You can use strand.getBeadByType() to look for any other beads >>your bead might need. >> >>I separated the setting of the strand into two functions so that bead >>authors have a clear path in that they always override strandReady and >>optionally override beadsLoaded. This would give a consistent pattern to >>bead loading and allow the underlaying bead framework to be changed in >>the >>future. I don't think this will add much overhead to the PAYG plan, and I >>think it will be easier for developers to know what to do if there is a >>consistent set of steps to follow. These functions in BaseBead may be >>minor, but it would save developers from having to do the same thing over >>and over. > >Hmm. Maybe. How would the base class know when and whether to call >beadsLoaded. Having every bead listen for beadsAdded might add up to >something. Yes, that's true. Maybe in strandReady() you set a boolean like needsToWait which then triggers the BaseBead to set up the event listener. > >-Alex >