Return-Path: X-Original-To: apmail-flex-dev-archive@www.apache.org Delivered-To: apmail-flex-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A0A2B115CC for ; Fri, 10 May 2013 16:35:52 +0000 (UTC) Received: (qmail 83087 invoked by uid 500); 10 May 2013 16:35:51 -0000 Delivered-To: apmail-flex-dev-archive@flex.apache.org Received: (qmail 83057 invoked by uid 500); 10 May 2013 16:35:51 -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 83048 invoked by uid 99); 10 May 2013 16:35:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 May 2013 16:35:51 +0000 X-ASF-Spam-Status: No, hits=-1.3 required=5.0 tests=FRT_ADOBE2,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aharui@adobe.com designates 64.18.1.21 as permitted sender) Received: from [64.18.1.21] (HELO exprod6og108.obsmtp.com) (64.18.1.21) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 May 2013 16:35:45 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob108.postini.com ([64.18.5.12]) with SMTP ID DSNKUY0hy34x+SwEx8ieSwTkGN9aGvjeMOQO@postini.com; Fri, 10 May 2013 09:35:24 PDT Received: from inner-relay-4.eur.adobe.com (inner-relay-4.adobe.com [193.104.215.14]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id r4AGW71v018416 for ; Fri, 10 May 2013 09:32:07 -0700 (PDT) Received: from nacas01.corp.adobe.com (nacas01.corp.adobe.com [10.8.189.99]) by inner-relay-4.eur.adobe.com (8.12.10/8.12.9) with ESMTP id r4AGZIGW002043 for ; Fri, 10 May 2013 09:35:21 -0700 (PDT) Received: from NAMBX02.corp.adobe.com ([10.8.127.96]) by nacas01.corp.adobe.com ([10.8.189.99]) with mapi; Fri, 10 May 2013 09:35:17 -0700 From: Alex Harui To: "dev@flex.apache.org" Date: Fri, 10 May 2013 09:35:13 -0700 Subject: Re: [OT] Set default prefix for a custom MXML namespace in Flash Builder 4.7? Thread-Topic: [OT] Set default prefix for a custom MXML namespace in Flash Builder 4.7? Thread-Index: Ac5NmTdi300JdyE+Q3S5avu4icVcyQAAyDO4 Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-Entourage/13.16.0.130206 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org I think that is probably hard coded. In the completion it is already offering ns as the prefix. But could you use a template that has your xmlns already baked in? On 5/10/13 9:12 AM, "Cosma Colanicchia" wrote: > You type "<" and the name of a component, let's say MyCustomComponent, th= at > is in the library with a namespace manifest. >=20 > FB will add, in the root element of the mxml, a declaration > (xmlns:ns=3D"") and apply that prefix ("=20 > There's no way, AFAK, to associate to each uri a preferred prefix, to avo= id > fixing the ns, ns1 ecc. generated prefixes. >=20 >=20 >=20 > 2013/5/10 Alex Harui >=20 >> I guess I still don't understand the steps. What are you typing and how= is >> FB responding? >>=20 >>=20 >> On 5/10/13 8:37 AM, "Cosma Colanicchia" wrote: >>=20 >>> I am creating an swc library that includes a namespace manifest, using >> the >>> documented COMPC compiler API. >>>=20 >>> When referencing and using a library with a manifest, the first time yo= u >>> use a component in a MXML document FB will autodeclare the namespace ur= i >>> for you, using a prefix like "ns", "ns1", ecc. >>>=20 >>> I was searching for a way to tell FB that, for the namespace uri " >>> http://my.domain/ns/mylib" I'd like to use the prefix, >> without >>> declaring it in advance or correcting the declaration after each first >>> usage on new MXML documents (like FB already does for standard mx/s/fx >>> namespaces). >>>=20 >>>=20 >>>=20 >>>=20 >>> 2013/5/10 Alex Harui >>>=20 >>>> None of us worked on FB, so we don't know how it works. I'm not clear >> what >>>> the steps you are using to reproduce this issue is. Are you just typi= ng >>>> xmlns in an MXML file or is it the auto-complete suggestions or >> something >>>> else? >>>>=20 >>>>=20 >>>> On 5/10/13 5:04 AM, "Carlos Rovira" >> wrote: >>>>=20 >>>>> Hi Cosma, >>>>>=20 >>>>> very interesting, I have the same issue with my as3 libraries. My >> defined >>>>> library namespace is "r" but FB throws "ns" >>>>>=20 >>>>> I couldn't get this to work again since FB4.7 >>>>>=20 >>>>> Maybe Alex, Carol or Peter could point what's happening and if >> something >>>>> could be done to fixit or is something >>>>> that only a patch in FB could solve. >>>>>=20 >>>>>=20 >>>>>=20 >>>>> 2013/5/10 Cosma Colanicchia >>>>>=20 >>>>>> I have a SWC library declaring a custom namespace, when I use it I'd >>>> like >>>>>> to have FB suggest a custom prefix declaration in MXML. >>>>>>=20 >>>>>> Currently, FB is able to provide the default "s", "fx" and "mx" >> prefixes >>>>>> automatically, any other is declared as "ns", "ns1" and so on. >>>>>>=20 >>>>>> In previous version there was an undocumented way using a design.xml >> to >>>> set >>>>>> a default in the swc library itself, but was probably part of the >> design >>>>>> view feature and doesn't work anymore in FB 4.7 (see [1] for details= ). >>>>>>=20 >>>>>> Documentation of FB 4.7 [2] about the file template customization >>>> describes >>>>>> an ${xmlns} token (for new MXML components) that should be gather in= fo >>>> from >>>>>> some namespace preferences, but I can't find any such preferences >>>> settings. >>>>>>=20 >>>>>> I also found that the only place in Flash Builder folders with >>>> references >>>>>> these prefixes settings in clear text is the plugin.xml file of >>>>>> the com.adobe.flexide.mxml.core_4.7.0.349722 plugin , in the >>>>>> "com.adobe.flexbuilder.codemodel.mxmlNamespaceRegistry" extension, I >>>> tried >>>>>> adding additional MXMLNamespace nodes specifiny the prefix and uri, >>>> with no >>>>>> effects (SDK contains the namespaces uri in various XML files, but I >>>> found >>>>>> no traces of the default prefixes). >>>>>>=20 >>>>>> Anyone had luck? Am I the only one trying to use custom prefix? :) >>>>>>=20 >>>>>>=20 >>>>>> [1] >>>>>>=20 >>>>>>=20 >>>>=20 >> http://stackoverflow.com/questions/6453919/how-can-i-make-flashbuilder-u= se-a- >>>>>> custom-namespace-prefix/6456120#6456120 >>>>>>=20 >>>>>> [2] >>>>>>=20 >>>>>>=20 >>>>=20 >> http://help.adobe.com/en_US/flashbuilder/using/WSe4e4b720da9dedb5344c6f7= 11358 >>>>>> acdda1d-7fff.html#WSe4e4b720da9dedb56fd3caca12e6bb494bb-7fee >>>>>>=20 >>>>>=20 >>>>>=20 >>>>=20 >>>> -- >>>> Alex Harui >>>> Flex SDK Team >>>> Adobe Systems, Inc. >>>> http://blogs.adobe.com/aharui >>>>=20 >>>>=20 >>=20 >> -- >> Alex Harui >> Flex SDK Team >> Adobe Systems, Inc. >> http://blogs.adobe.com/aharui >>=20 >>=20 --=20 Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui