You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by Serkan Taş <se...@likyateknoloji.com> on 2019/11/24 17:20:43 UTC
Function call sequence
Hi,
In my application I have menu item and a handler which opens file view
popup. It is highly dependent on the function calls of component creation.
While debugging the code;
private function showGenericPopup(fileTag:String):void {
var fileViewWindow:FileViewPopup =
PopUpManager.createPopUp(parentApplication as mx.core.IUIComponent,
FileViewPopup, true) as FileViewPopup;
fileViewWindow.isNativeXML = true;
fileViewWindow.fileTag = fileTag; //"joblog=" +
jobDetailLocalXml.@Id;
PopUpManager.centerPopUp(fileViewWindow);
fileViewWindow.setFocus();
}
the function defined above is called,
* in Flex, the /"creationComplete"/related function of
/FileViewPopup /is called at the line
/"PopUpManager.centerPopUp(fileViewWindow);"/
* in Royale, the /"creationComplete"/ related functionof
/FileViewPopup /is called at the line /"var
fileViewWindow:FileViewPopup =
PopUpManager.createPopUp(parentApplication as mx.core.IUIComponent,
FileViewPopup, true) as FileViewPopup;"/
So in royale some attributes are not yet set while the component is
created.
What should be the right behavior ?
Is this a bug or new implementation is decided like above ?
How should I overcome this issue ?
Thanks,
Serkan
Re: Function call sequence
Posted by Serkan Taş <se...@likyateknoloji.com>.
Swapping the args worked also I tried another workaround.
Made initialization function public, removed it from "creationComplete"
and called manually after setting the arguments.
Thanks,
Serkan
25.11.2019 09:56 tarihinde Alex Harui yazdı:
>
> Swap the order of args to addPopUp
>
> *From: *Serkan Taş <se...@likyateknoloji.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>,
> "users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Sunday, November 24, 2019 at 10:18 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Function call sequence
>
> popUpHost host is null
>
> var /** @type {org.apache.royale.core.IPopUpHost} */ popUpHost =
> org.apache.royale.utils.UIUtils.findPopUpHost(org.apache.royale.utils.Language.as(parent,
> org.apache.royale.core.IUIBase));
>
> returns null
>
> 25.11.2019 09:14 tarihinde Serkan Taş yazdı:
>
> I got the exception below after changing code :
>
>
>
>
> At the line :
>
>
>
>
> 25.11.2019 09:03 tarihinde Alex Harui yazdı:
>
> private function showGenericPopup(fileTag:String):void {
> var fileViewWindow:FileViewPopup = new
> FileViewPopup();
>
> fileViewWindow.isNativeXML = true;
> fileViewWindow.fileTag = fileTag; //"joblog="
> + jobDetailLocalXml.@Id;
> PopUpManager.addPopUp(parentApplication as
> mx.core.IUIComponent, fileViewWindow, true);
> PopUpManager.centerPopUp(fileViewWindow);
> fileViewWindow.setFocus();
> }
>
>
> *From: *Serkan Taş <se...@likyateknoloji.com>
> <ma...@likyateknoloji.com>
> *Reply-To: *"users@royale.apache.org"
> <ma...@royale.apache.org> <us...@royale.apache.org>
> <ma...@royale.apache.org>
> *Date: *Sunday, November 24, 2019 at 9:23 PM
> *To: *"users@royale.apache.org"
> <ma...@royale.apache.org> <us...@royale.apache.org>
> <ma...@royale.apache.org>
> *Subject: *Re: Function call sequence
>
> How can I set the property ? I need the reference of the
> object and object is created while I am getting the reference ?
>
> May be I am missing something, I will check.
>
> Thanks,
>
> Serkan
>
> Android için Outlook
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fghei36&data=02%7C01%7Caharui%40adobe.com%7C4e6e8e2761dc40b0208c08d7716f3c45%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637102594880203294&sdata=UZO0dGRP%2But4WM8jc%2FFn3Nyd0wiffvn5SuAt5poJpG4%3D&reserved=0>'u
> edinin
>
>
>
>
> On Mon, Nov 25, 2019 at 8:14 AM +0300, "Alex Harui"
> <aharui@adobe.com <ma...@adobe.com>> wrote:
>
> Royale will not guarantee the timing of Flex. Flex didn’t
> really guarantee the timing of creationComplete either.
> If your component forced a validateNow() the
> creationComplete would happen in the same place.
>
> It is probably best to rewrite that to instantiate and
> call addPopUp after setting properties.
>
> My 2 cents,
>
> -Alex
>
> *From: *Serkan Taş <se...@likyateknoloji.com>
> <ma...@likyateknoloji.com>
> *Reply-To: *"users@royale.apache.org"
> <ma...@royale.apache.org> <us...@royale.apache.org>
> <ma...@royale.apache.org>
> *Date: *Sunday, November 24, 2019 at 9:21 AM
> *To: *"users@royale.apache.org"
> <ma...@royale.apache.org> <us...@royale.apache.org>
> <ma...@royale.apache.org>
> *Subject: *Function call sequence
>
> Hi,
>
> In my application I have menu item and a handler which
> opens file view popup. It is highly dependent on the
> function calls of component creation.
>
> While debugging the code;
>
>
> private function showGenericPopup(fileTag:String):void {
> var fileViewWindow:FileViewPopup =
> PopUpManager.createPopUp(parentApplication as
> mx.core.IUIComponent, FileViewPopup, true) as FileViewPopup;
> fileViewWindow.isNativeXML = true;
> fileViewWindow.fileTag = fileTag;
> //"joblog=" + jobDetailLocalXml.@Id;
> PopUpManager.centerPopUp(fileViewWindow);
> fileViewWindow.setFocus();
> }
>
> the function defined above is called,
>
> · in Flex, the /"creationComplete"/ related function of
> /FileViewPopup /is called at the line
> /"PopUpManager.centerPopUp(fileViewWindow);"/
>
> · in Royale, the /"creationComplete"/ related function
> of /FileViewPopup /is called at the line /"var
> fileViewWindow:FileViewPopup =
> PopUpManager.createPopUp(parentApplication as
> mx.core.IUIComponent, FileViewPopup, true) as FileViewPopup;"/
>
> So in royale some attributes are not yet set while the
> component is created.
>
> What should be the right behavior ?
>
> Is this a bug or new implementation is decided like above ?
>
> How should I overcome this issue ?
>
> Thanks,
>
> Serkan
>
>
>
Re: Function call sequence
Posted by Alex Harui <ah...@adobe.com>.
Swap the order of args to addPopUp
From: Serkan Taş <se...@likyateknoloji.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>, "users@royale.apache.org" <us...@royale.apache.org>
Date: Sunday, November 24, 2019 at 10:18 PM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Function call sequence
popUpHost host is null
var /** @type {org.apache.royale.core.IPopUpHost} */ popUpHost = org.apache.royale.utils.UIUtils.findPopUpHost(org.apache.royale.utils.Language.as(parent, org.apache.royale.core.IUIBase));
returns null
25.11.2019 09:14 tarihinde Serkan Taş yazdı:
I got the exception below after changing code :
[cid:image001.png@01D5A31A.76F6A350]
At the line :
[cid:image002.png@01D5A31A.76F6A350]
25.11.2019 09:03 tarihinde Alex Harui yazdı:
private function showGenericPopup(fileTag:String):void {
var fileViewWindow:FileViewPopup = new FileViewPopup();
fileViewWindow.isNativeXML = true;
fileViewWindow.fileTag = fileTag; //"joblog=" + jobDetailLocalXml.@Id;
PopUpManager.addPopUp(parentApplication as mx.core.IUIComponent, fileViewWindow, true);
PopUpManager.centerPopUp(fileViewWindow);
fileViewWindow.setFocus();
}
From: Serkan Taş <se...@likyateknoloji.com>
Reply-To: "users@royale.apache.org"<ma...@royale.apache.org> <us...@royale.apache.org>
Date: Sunday, November 24, 2019 at 9:23 PM
To: "users@royale.apache.org"<ma...@royale.apache.org> <us...@royale.apache.org>
Subject: Re: Function call sequence
How can I set the property ? I need the reference of the object and object is created while I am getting the reference ?
May be I am missing something, I will check.
Thanks,
Serkan
Android için Outlook<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fghei36&data=02%7C01%7Caharui%40adobe.com%7C4e6e8e2761dc40b0208c08d7716f3c45%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637102594880203294&sdata=UZO0dGRP%2But4WM8jc%2FFn3Nyd0wiffvn5SuAt5poJpG4%3D&reserved=0>'u edinin
On Mon, Nov 25, 2019 at 8:14 AM +0300, "Alex Harui" <ah...@adobe.com>> wrote:
Royale will not guarantee the timing of Flex. Flex didn’t really guarantee the timing of creationComplete either. If your component forced a validateNow() the creationComplete would happen in the same place.
It is probably best to rewrite that to instantiate and call addPopUp after setting properties.
My 2 cents,
-Alex
From: Serkan Taş <se...@likyateknoloji.com>
Reply-To: "users@royale.apache.org"<ma...@royale.apache.org> <us...@royale.apache.org>
Date: Sunday, November 24, 2019 at 9:21 AM
To: "users@royale.apache.org"<ma...@royale.apache.org> <us...@royale.apache.org>
Subject: Function call sequence
Hi,
In my application I have menu item and a handler which opens file view popup. It is highly dependent on the function calls of component creation.
While debugging the code;
private function showGenericPopup(fileTag:String):void {
var fileViewWindow:FileViewPopup = PopUpManager.createPopUp(parentApplication as mx.core.IUIComponent, FileViewPopup, true) as FileViewPopup;
fileViewWindow.isNativeXML = true;
fileViewWindow.fileTag = fileTag; //"joblog=" + jobDetailLocalXml.@Id;
PopUpManager.centerPopUp(fileViewWindow);
fileViewWindow.setFocus();
}
the function defined above is called,
· in Flex, the "creationComplete" related function of FileViewPopup is called at the line "PopUpManager.centerPopUp(fileViewWindow);"
· in Royale, the "creationComplete" related function of FileViewPopup is called at the line "var fileViewWindow:FileViewPopup = PopUpManager.createPopUp(parentApplication as mx.core.IUIComponent, FileViewPopup, true) as FileViewPopup;"
So in royale some attributes are not yet set while the component is created.
What should be the right behavior ?
Is this a bug or new implementation is decided like above ?
How should I overcome this issue ?
Thanks,
Serkan
Re: Function call sequence
Posted by Serkan Taş <se...@likyateknoloji.com>.
popUpHost host is null
var /** @type {org.apache.royale.core.IPopUpHost} */ popUpHost =
org.apache.royale.utils.UIUtils.findPopUpHost(org.apache.royale.utils.Language.as(parent,
org.apache.royale.core.IUIBase));
returns null
25.11.2019 09:14 tarihinde Serkan Taş yazdı:
> I got the exception below after changing code :
>
>
>
>
> At the line :
>
>
>
>
>
> 25.11.2019 09:03 tarihinde Alex Harui yazdı:
>>
>> private function showGenericPopup(fileTag:String):void {
>> var fileViewWindow:FileViewPopup = new FileViewPopup();
>>
>> fileViewWindow.isNativeXML = true;
>> fileViewWindow.fileTag = fileTag; //"joblog=" +
>> jobDetailLocalXml.@Id;
>> PopUpManager.addPopUp(parentApplication as
>> mx.core.IUIComponent, fileViewWindow, true);
>> PopUpManager.centerPopUp(fileViewWindow);
>> fileViewWindow.setFocus();
>> }
>>
>> *From: *Serkan Taş <se...@likyateknoloji.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Sunday, November 24, 2019 at 9:23 PM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Re: Function call sequence
>>
>> How can I set the property ? I need the reference of the object and
>> object is created while I am getting the reference ?
>>
>> May be I am missing something, I will check.
>>
>> Thanks,
>>
>> Serkan
>>
>> Android için Outlook
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fghei36&data=02%7C01%7Caharui%40adobe.com%7Cb16a79d064a04704aea908d77167962f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637102562042108322&sdata=a6gIsWbm2gbLUFNAx6Q%2FJsaj9sKpjgtKc7rTAjB3oNw%3D&reserved=0>'u
>> edinin
>>
>>
>>
>> On Mon, Nov 25, 2019 at 8:14 AM +0300, "Alex Harui" <aharui@adobe.com
>> <ma...@adobe.com>> wrote:
>>
>> Royale will not guarantee the timing of Flex. Flex didn’t really
>> guarantee the timing of creationComplete either. If your
>> component forced a validateNow() the creationComplete would
>> happen in the same place.
>>
>> It is probably best to rewrite that to instantiate and call
>> addPopUp after setting properties.
>>
>> My 2 cents,
>>
>> -Alex
>>
>> *From: *Serkan Taş <se...@likyateknoloji.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Sunday, November 24, 2019 at 9:21 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Function call sequence
>>
>> Hi,
>>
>> In my application I have menu item and a handler which opens file
>> view popup. It is highly dependent on the function calls of
>> component creation.
>>
>> While debugging the code;
>>
>>
>> private function showGenericPopup(fileTag:String):void {
>> var fileViewWindow:FileViewPopup =
>> PopUpManager.createPopUp(parentApplication as
>> mx.core.IUIComponent, FileViewPopup, true) as FileViewPopup;
>> fileViewWindow.isNativeXML = true;
>> fileViewWindow.fileTag = fileTag; //"joblog=" +
>> jobDetailLocalXml.@Id;
>> PopUpManager.centerPopUp(fileViewWindow);
>> fileViewWindow.setFocus();
>> }
>>
>> the function defined above is called,
>>
>> · in Flex, the /"creationComplete"/ related function of
>> /FileViewPopup /is called at the line
>> /"PopUpManager.centerPopUp(fileViewWindow);"/
>>
>> · in Royale, the /"creationComplete"/ related function of
>> /FileViewPopup /is called at the line /"var
>> fileViewWindow:FileViewPopup =
>> PopUpManager.createPopUp(parentApplication as
>> mx.core.IUIComponent, FileViewPopup, true) as FileViewPopup;"/
>>
>> So in royale some attributes are not yet set while the component
>> is created.
>>
>> What should be the right behavior ?
>>
>> Is this a bug or new implementation is decided like above ?
>>
>> How should I overcome this issue ?
>>
>> Thanks,
>>
>> Serkan
>>
>
Re: Function call sequence
Posted by Serkan Taş <se...@likyateknoloji.com>.
I got the exception below after changing code :
At the line :
25.11.2019 09:03 tarihinde Alex Harui yazdı:
>
> private function showGenericPopup(fileTag:String):void {
> var fileViewWindow:FileViewPopup = new FileViewPopup();
>
> fileViewWindow.isNativeXML = true;
> fileViewWindow.fileTag = fileTag; //"joblog=" +
> jobDetailLocalXml.@Id;
> PopUpManager.addPopUp(parentApplication as
> mx.core.IUIComponent, fileViewWindow, true);
> PopUpManager.centerPopUp(fileViewWindow);
> fileViewWindow.setFocus();
> }
>
> *From: *Serkan Taş <se...@likyateknoloji.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Sunday, November 24, 2019 at 9:23 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Function call sequence
>
> How can I set the property ? I need the reference of the object and
> object is created while I am getting the reference ?
>
> May be I am missing something, I will check.
>
> Thanks,
>
> Serkan
>
> Android için Outlook
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fghei36&data=02%7C01%7Caharui%40adobe.com%7Cb16a79d064a04704aea908d77167962f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637102562042108322&sdata=a6gIsWbm2gbLUFNAx6Q%2FJsaj9sKpjgtKc7rTAjB3oNw%3D&reserved=0>'u
> edinin
>
>
>
> On Mon, Nov 25, 2019 at 8:14 AM +0300, "Alex Harui" <aharui@adobe.com
> <ma...@adobe.com>> wrote:
>
> Royale will not guarantee the timing of Flex. Flex didn’t really
> guarantee the timing of creationComplete either. If your
> component forced a validateNow() the creationComplete would happen
> in the same place.
>
> It is probably best to rewrite that to instantiate and call
> addPopUp after setting properties.
>
> My 2 cents,
>
> -Alex
>
> *From: *Serkan Taş <se...@likyateknoloji.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Sunday, November 24, 2019 at 9:21 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Function call sequence
>
> Hi,
>
> In my application I have menu item and a handler which opens file
> view popup. It is highly dependent on the function calls of
> component creation.
>
> While debugging the code;
>
>
> private function showGenericPopup(fileTag:String):void {
> var fileViewWindow:FileViewPopup =
> PopUpManager.createPopUp(parentApplication as
> mx.core.IUIComponent, FileViewPopup, true) as FileViewPopup;
> fileViewWindow.isNativeXML = true;
> fileViewWindow.fileTag = fileTag; //"joblog=" +
> jobDetailLocalXml.@Id;
> PopUpManager.centerPopUp(fileViewWindow);
> fileViewWindow.setFocus();
> }
>
> the function defined above is called,
>
> ·in Flex, the /"creationComplete"/ related function of
> /FileViewPopup /is called at the line
> /"PopUpManager.centerPopUp(fileViewWindow);"/
>
> ·in Royale, the /"creationComplete"/ related function of
> /FileViewPopup /is called at the line /"var
> fileViewWindow:FileViewPopup =
> PopUpManager.createPopUp(parentApplication as
> mx.core.IUIComponent, FileViewPopup, true) as FileViewPopup;"/
>
> So in royale some attributes are not yet set while the component
> is created.
>
> What should be the right behavior ?
>
> Is this a bug or new implementation is decided like above ?
>
> How should I overcome this issue ?
>
> Thanks,
>
> Serkan
>
Re: Function call sequence
Posted by Alex Harui <ah...@adobe.com>.
private function showGenericPopup(fileTag:String):void {
var fileViewWindow:FileViewPopup = new FileViewPopup();
fileViewWindow.isNativeXML = true;
fileViewWindow.fileTag = fileTag; //"joblog=" + jobDetailLocalXml.@Id;
PopUpManager.addPopUp(parentApplication as mx.core.IUIComponent, fileViewWindow, true);
PopUpManager.centerPopUp(fileViewWindow);
fileViewWindow.setFocus();
}
From: Serkan Taş <se...@likyateknoloji.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Sunday, November 24, 2019 at 9:23 PM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Function call sequence
How can I set the property ? I need the reference of the object and object is created while I am getting the reference ?
May be I am missing something, I will check.
Thanks,
Serkan
Android için Outlook<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fghei36&data=02%7C01%7Caharui%40adobe.com%7Cb16a79d064a04704aea908d77167962f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637102562042108322&sdata=a6gIsWbm2gbLUFNAx6Q%2FJsaj9sKpjgtKc7rTAjB3oNw%3D&reserved=0>'u edinin
On Mon, Nov 25, 2019 at 8:14 AM +0300, "Alex Harui" <ah...@adobe.com>> wrote:
Royale will not guarantee the timing of Flex. Flex didn’t really guarantee the timing of creationComplete either. If your component forced a validateNow() the creationComplete would happen in the same place.
It is probably best to rewrite that to instantiate and call addPopUp after setting properties.
My 2 cents,
-Alex
From: Serkan Taş <se...@likyateknoloji.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Sunday, November 24, 2019 at 9:21 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Function call sequence
Hi,
In my application I have menu item and a handler which opens file view popup. It is highly dependent on the function calls of component creation.
While debugging the code;
private function showGenericPopup(fileTag:String):void {
var fileViewWindow:FileViewPopup = PopUpManager.createPopUp(parentApplication as mx.core.IUIComponent, FileViewPopup, true) as FileViewPopup;
fileViewWindow.isNativeXML = true;
fileViewWindow.fileTag = fileTag; //"joblog=" + jobDetailLocalXml.@Id;
PopUpManager.centerPopUp(fileViewWindow);
fileViewWindow.setFocus();
}
the function defined above is called,
· in Flex, the "creationComplete" related function of FileViewPopup is called at the line "PopUpManager.centerPopUp(fileViewWindow);"
· in Royale, the "creationComplete" related function of FileViewPopup is called at the line "var fileViewWindow:FileViewPopup = PopUpManager.createPopUp(parentApplication as mx.core.IUIComponent, FileViewPopup, true) as FileViewPopup;"
So in royale some attributes are not yet set while the component is created.
What should be the right behavior ?
Is this a bug or new implementation is decided like above ?
How should I overcome this issue ?
Thanks,
Serkan
Re: Function call sequence
Posted by Serkan Taş <se...@likyateknoloji.com>.
How can I set the property ? I need the reference of the object and object is created while I am getting the reference ?
May be I am missing something, I will check.
Thanks,
Serkan
Android için Outlook'u edinin
On Mon, Nov 25, 2019 at 8:14 AM +0300, "Alex Harui" <ah...@adobe.com> wrote:
Royale will not guarantee the timing of Flex. Flex didn’t really guarantee the timing of creationComplete either. If your component forced a validateNow() the creationComplete would happen in the same place.
It is probably best to rewrite that to instantiate and call addPopUp after setting properties.
My 2 cents,
-Alex
From:
Serkan Taş <se...@likyateknoloji.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Sunday, November 24, 2019 at 9:21 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Function call sequence
Hi,
In my application I have menu item and a handler which opens file view popup. It is highly dependent on the function calls of component creation.
While debugging the code;
private function showGenericPopup(fileTag:String):void {
var fileViewWindow:FileViewPopup = PopUpManager.createPopUp(parentApplication as mx.core.IUIComponent, FileViewPopup, true) as FileViewPopup;
fileViewWindow.isNativeXML = true;
fileViewWindow.fileTag = fileTag; //"joblog=" + jobDetailLocalXml.@Id;
PopUpManager.centerPopUp(fileViewWindow);
fileViewWindow.setFocus();
}
the function defined above is called,
·
in Flex, the "creationComplete" related function of
FileViewPopup is called at the line "PopUpManager.centerPopUp(fileViewWindow);"
·
in Royale, the "creationComplete" related function of
FileViewPopup is called at the line "var fileViewWindow:FileViewPopup = PopUpManager.createPopUp(parentApplication as mx.core.IUIComponent, FileViewPopup, true) as FileViewPopup;"
So in royale some attributes are not yet set while the component is created.
What should be the right behavior ?
Is this a bug or new implementation is decided like above ?
How should I overcome this issue ?
Thanks,
Serkan
Re: Function call sequence
Posted by Alex Harui <ah...@adobe.com>.
Royale will not guarantee the timing of Flex. Flex didn’t really guarantee the timing of creationComplete either. If your component forced a validateNow() the creationComplete would happen in the same place.
It is probably best to rewrite that to instantiate and call addPopUp after setting properties.
My 2 cents,
-Alex
From: Serkan Taş <se...@likyateknoloji.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Sunday, November 24, 2019 at 9:21 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Function call sequence
Hi,
In my application I have menu item and a handler which opens file view popup. It is highly dependent on the function calls of component creation.
While debugging the code;
private function showGenericPopup(fileTag:String):void {
var fileViewWindow:FileViewPopup = PopUpManager.createPopUp(parentApplication as mx.core.IUIComponent, FileViewPopup, true) as FileViewPopup;
fileViewWindow.isNativeXML = true;
fileViewWindow.fileTag = fileTag; //"joblog=" + jobDetailLocalXml.@Id;
PopUpManager.centerPopUp(fileViewWindow);
fileViewWindow.setFocus();
}
the function defined above is called,
· in Flex, the "creationComplete" related function of FileViewPopup is called at the line "PopUpManager.centerPopUp(fileViewWindow);"
· in Royale, the "creationComplete" related function of FileViewPopup is called at the line "var fileViewWindow:FileViewPopup = PopUpManager.createPopUp(parentApplication as mx.core.IUIComponent, FileViewPopup, true) as FileViewPopup;"
So in royale some attributes are not yet set while the component is created.
What should be the right behavior ?
Is this a bug or new implementation is decided like above ?
How should I overcome this issue ?
Thanks,
Serkan