Return-Path: X-Original-To: apmail-flex-users-archive@www.apache.org Delivered-To: apmail-flex-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EF98C10EE8 for ; Sat, 19 Jul 2014 11:09:16 +0000 (UTC) Received: (qmail 47315 invoked by uid 500); 19 Jul 2014 11:09:16 -0000 Delivered-To: apmail-flex-users-archive@flex.apache.org Received: (qmail 47283 invoked by uid 500); 19 Jul 2014 11:09:16 -0000 Mailing-List: contact users-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@flex.apache.org Delivered-To: mailing list users@flex.apache.org Received: (qmail 47270 invoked by uid 99); 19 Jul 2014 11:09:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Jul 2014 11:09:16 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_HELO_PASS,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [162.253.133.43] (HELO mwork.nabble.com) (162.253.133.43) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Jul 2014 11:09:10 +0000 Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id 6D44721735D for ; Sat, 19 Jul 2014 04:07:45 -0700 (PDT) Date: Sat, 19 Jul 2014 04:08:47 -0700 (PDT) From: After24 To: users@flex.apache.org Message-ID: <1405768127933-7339.post@n4.nabble.com> Subject: ItemRenderer declaration in MXML MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello, I'm building a custom component with an itemRenderer public property : public function get itemRenderer():IFactory { return _itemRenderer; } public function set itemRenderer(value:IFactory):void { _itemRenderer = value; ..... } So the setter is waiting for an IFactory. In MXML, for components like spark List or Datagrid, the itemRenderer property can be set with the following declaration : itemRenderer="com.foo.ItemRenderClass" I would like to understand the mechanism that allow the conversion of the String into an IFactory. I guess the compiler checks if com.foo.ItemRenderClass exists and, if true, returns a new ClassFactory(ItemRenderClass) ? Is it possible to get the same behavior with a custom component, I mean having the possibility to use a classPath String in MXML while the setter of the property is waiting for a different type (like an Ifactory in my case) ? is it based on Metadata ? Thank you. -- View this message in context: http://apache-flex-users.2333346.n4.nabble.com/ItemRenderer-declaration-in-MXML-tp7339.html Sent from the Apache Flex Users mailing list archive at Nabble.com.