Hi Harbs, until now I used "id" in html tag to switch between contents, but I want to avoid "id" if possible for this reason this change. We only need some component property, so don't need to have "id" suffix or prefix. I think it could be even "name", but maybe that's already used and can create some conflict. We can change to "activeId" as well as you proposed, but we can even try some shorter one, maybe "nameId" if "name is not available for this use?
El mié., 26 dic. 2018 a las 11:08, Harbs (<[email protected]>) escribió: > “activableName” sounds kind of awkward. What about activeName instead? Or > ActiveId? ActiveId seems the best fit considering it’s using the element id > if I understand correctly. > > > > On Dec 26, 2018, at 11:50 AM, [email protected] wrote: > > > > This is an automated email from the ASF dual-hosted git repository. > > > > carlosrovira pushed a commit to branch develop > > in repository https://gitbox.apache.org/repos/asf/royale-asjs.git > > > > > > The following commit(s) were added to refs/heads/develop by this push: > > new f47a24a improve IActivable to not rely on ids and use new > activableName property > > f47a24a is described below > > > > commit f47a24a6cade10a8da297f2f9cd86dc4632754e6 > > Author: Carlos Rovira <[email protected]> > > AuthorDate: Wed Dec 26 10:50:21 2018 +0100 > > > > improve IActivable to not rely on ids and use new activableName > property > > --- > > .../apache/royale/jewel/ApplicationMainContent.as | 6 +++--- > > .../org/apache/royale/jewel/SectionContent.as | 23 > ++++++++++++++++++++++ > > .../org/apache/royale/jewel/TabBarContent.as | 6 +++--- > > .../org/apache/royale/jewel/WizardContent.as | 6 +++--- > > .../royale/jewel/supportClasses/IActivable.as | 11 +++++++++++ > > 5 files changed, 43 insertions(+), 9 deletions(-) > > > > diff --git > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ApplicationMainContent.as > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ApplicationMainContent.as > > index 21c47a0..389c209 100644 > > --- > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ApplicationMainContent.as > > +++ > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ApplicationMainContent.as > > @@ -85,14 +85,14 @@ package org.apache.royale.jewel > > /** > > * shows a concrete content and hides the rest > > * > > - * @param id, the id of the container to show > > + * @param activableName, the activableName of the > container to show > > * > > * @langversion 3.0 > > * @playerversion Flash 10.2 > > * @playerversion AIR 2.6 > > * @productversion Royale 0.9.4 > > */ > > - public function showContent(id:String):void > > + public function showContent(activableName:String):void > > { > > try > > { > > @@ -100,7 +100,7 @@ package org.apache.royale.jewel > > { > > var content:IActivable = > getElementAt(i) as IActivable; > > > > - if(content.id == id) > > + if(content.activableName == > activableName) > > { > > content.isActive = true; > > } > > diff --git > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SectionContent.as > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SectionContent.as > > index 056514e..515320e 100644 > > --- > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SectionContent.as > > +++ > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/SectionContent.as > > @@ -87,5 +87,28 @@ package org.apache.royale.jewel > > toggleClass("is-active", _isActive); > > } > > } > > + > > + private var _activableName:String; > > + > > + /** > > + * activableName is the name od this activable content > > + * > > + * @langversion 3.0 > > + * @playerversion Flash 10.2 > > + * @playerversion AIR 2.6 > > + * @productversion Royale 0.9.4 > > + */ > > + public function get activableName():String > > + { > > + return _activableName; > > + } > > + > > + public function set activableName(value:String):void > > + { > > + if (_activableName != value) > > + { > > + _activableName = value; > > + } > > + } > > } > > } > > diff --git > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TabBarContent.as > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TabBarContent.as > > index 7bd118e..91b95d1 100644 > > --- > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TabBarContent.as > > +++ > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/TabBarContent.as > > @@ -56,14 +56,14 @@ package org.apache.royale.jewel > > /** > > * shows a concrete content and hides the rest > > * > > - * @param id, the id of the container to show > > + * @param name, the name of the container to show > > * > > * @langversion 3.0 > > * @playerversion Flash 10.2 > > * @playerversion AIR 2.6 > > * @productversion Royale 0.9.4 > > */ > > - public function showContent(id:String):void > > + public function showContent(activableName:String):void > > { > > try > > { > > @@ -71,7 +71,7 @@ package org.apache.royale.jewel > > { > > var content:IActivable = > getElementAt(i) as IActivable; > > > > - if(content.id == id) > > + if(content.activableName == > activableName) > > { > > content.isActive = true; > > } > > diff --git > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/WizardContent.as > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/WizardContent.as > > index 31521a8..ad94fea 100644 > > --- > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/WizardContent.as > > +++ > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/WizardContent.as > > @@ -57,14 +57,14 @@ package org.apache.royale.jewel > > /** > > * shows a concrete content and hides the rest > > * > > - * @param id, the id of the container to show > > + * @param activableName, the activableName of the > container to show > > * > > * @langversion 3.0 > > * @playerversion Flash 10.2 > > * @playerversion AIR 2.6 > > * @productversion Royale 0.9.4 > > */ > > - public function showContent(id:String):void > > + public function showContent(activableName:String):void > > { > > try > > { > > @@ -72,7 +72,7 @@ package org.apache.royale.jewel > > { > > var content:IActivable = > getElementAt(i) as IActivable; > > > > - if(content.id == id) > > + if(content.activableName == > activableName) > > { > > content.isActive = true; > > } > > diff --git > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/IActivable.as > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/IActivable.as > > index 603fc2e..bb344e9 100644 > > --- > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/IActivable.as > > +++ > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/IActivable.as > > @@ -41,5 +41,16 @@ package org.apache.royale.jewel.supportClasses > > */ > > function get isActive():Boolean; > > function set isActive(value:Boolean):void; > > + > > + /** > > + * activableName is the name od this activable content > > + * > > + * @langversion 3.0 > > + * @playerversion Flash 10.2 > > + * @playerversion AIR 2.6 > > + * @productversion Royale 0.9.4 > > + */ > > + function get activableName():String; > > + function set activableName(value:String):void; > > } > > } > > > > -- <http://www.codeoscopic.com> Carlos Rovira Presidente Ejecutivo M: +34 607 22 60 05 http://www.codeoscopic.com Conócenos en 1 minuto! <https://avant2.es/#video> AVISO LEGAL: La información contenida en este correo electrónico, y en su caso en los documentos adjuntos, es información privilegiada para uso exclusivo de la persona y/o personas a las que va dirigido. No está permitido el acceso a este mensaje a cualquier otra persona distinta a los indicados. Si Usted no es uno de los destinatarios, cualquier duplicación, reproducción, distribución, así como cualquier uso de la información contenida en él o cualquiera otra acción u omisión tomada en relación con el mismo, está prohibida y puede ser ilegal. En dicho caso, por favor, notifíquelo al remitente y proceda a la eliminación de este correo electrónico, así como de sus adjuntos si los hubiere. En cumplimiento de la legislación española vigente en materia de protección de datos de carácter personal y del RGPD 679/2016 le informamos que sus datos están siendo objeto de tratamiento por parte de CODEOSCOPIC S.A. con CIFA85677342, con la finalidad del mantenimiento y gestión de relaciones comerciales y administrativas. La base jurídica del tratamiento es el interés legítimo de la empresa. No se prevén cesiones de sus datos, salvo que exista una obligación legal. Para ejercitar sus derechos puede dirigirse a CODEOSCOPIC S.A., domiciliada enPaseo de la Habana, 9-11, 28036 de Madrid (MADRID), o bien por email [email protected], con el fin de ejercer sus derechos de acceso, rectificación, supresión (derecho al olvido), limitación de tratamiento, portabilidad de los datos, oposición, y a no ser objeto de decisiones automatizadas, indicando como Asunto: “Derechos Ley Protección de Datos”, y adjuntando fotocopia de su DNI. Delegado de protección de datos:[email protected]
