Hi Carli,
the main problem is that you need to add to the parent the popup created
with
addElement(onePopup);
Notice that each time you'll be creating one popup and adding to the
container, so maybe you need to create some logic to ensure creation and
addition to parent is done just one time.
An additional issue (that does not gives error) is that click event
handlers has binding expressions. That's not needed
instead of
click="{this.popByMethod.open = true}"
you write only:
click="popByMethod.open = true"
HTH
Carlos
El lun., 16 dic. 2019 a las 17:03, Carlos Rovira (<[email protected]>)
escribió:
> Hi Carli,
> I'm going to try your code and see what I can report about it
>
> El lun., 16 dic. 2019 a las 16:56, De Carli Gustavo (<
> [email protected]>) escribió:
>
>> Hello, someone could be oriented because I do not have the same behavior
>> in the creation of a popup by msxml than by as. thank you very much
>> Method, popupByAs, is the problem, does nothing.
>>
>> thank
>>
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>> xmlns:html="library://ns.apache.org/royale/html"
>> xmlns:j="library://ns.apache.org/royale/jewel"
>> xmlns:Button="main.components.Button.*"
>> xmlns:Form="main.components.Form.*"
>> xmlns:js="library://ns.apache.org/royale/basic"
>> xmlns:c="components.*">
>>
>> <fx:Script>
>> <![CDATA[
>>
>> import org.apache.royale.events.Event;
>> import org.apache.royale.jewel.Button;
>> import org.apache.royale.jewel.PopUp;
>>
>> public function popupByAS(event:Event):void
>> {
>> trace('In method byAs');
>> var oneLabel:Label = new Label();
>> oneLabel.text = "Hello by As";
>> oneLabel.visible = true;
>>
>> var onePopup:PopUp = new PopUp();
>> onePopup.content = oneLabel;
>>
>> onePopup.open = true;
>> }
>>
>> ]]>
>> </fx:Script>
>>
>> <j:initialView>
>> <j:View>
>> <j:Button id="btnByInMXML"
>> text="By Method MXML"
>> x="10"
>> y="200"
>> emphasis="primary"
>> click="{this.popByMethod.open = true}"/>
>>
>>
>> <j:PopUp id="popByMethod">
>> <j:Label id="lblByMethod" text="Hello Method XML"/>
>> </j:PopUp>
>>
>>
>> <j:Button id="btnByInAS"
>> text="By Metodo AS"
>> x="10"
>> y="200"
>> emphasis="primary"
>> click="{this.popupByAS(event)}"/>
>> </j:View>
>> </j:initialView>
>> </j:Application>
>>
>>
>>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>
--
Carlos Rovira
http://about.me/carlosrovira