You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Scott Matheson <sm...@intralinks.com> on 2015/06/28 19:41:02 UTC

Events with itemRenders

Hi

   I have a grid with an itemRender, I want to centre the popup in the overall frame, so i am using " FlexGlobals.topLevelApplication as DisplayObject"


this is  snip on my code in the GridItemRender,


my problem is the addEventListener is not picking up the event from "DeleteStudentConfirmation" popup





<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               width="5">


      private function deleteAlert():void{


            // open the PopUp Window as a modal popup window
            // and store it in a variable for later use


               var popup:Object ;
               popup = PopUpManager.createPopUp( FlexGlobals.topLevelApplication as DisplayObject,  DeleteStudentConfirmation , true);
               PopUpManager.centerPopUp(popup as mx.core.IFlexDisplayObject);
               addEventListener("OKTODELETE", deleteThisRecords)
      }



the popup


private function deleteClosewindows():void {
   //     PopUpManager.removePopUp(this);

   _ep = new Event("OKTODELETE", true);
   dispatchEvent(_ep);
   PopUpManager.removePopUp(this);
}

Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you. 

Re: Events with itemRenders

Posted by Scott Matheson <sm...@intralinks.com>.
I know, that's what my son tells me all the time, 30 years programming and still making basic errors.... 

Anyway thanks and I will update the code with statics, I have the class in place, I was just to lazy to use them 

Sent from my iPad

> On 28 Jun 2015, at 21:16, Peter Ginneberge <p....@gmail.com> wrote:
> 
> 
> 
>> On 28/06/2015 20:24, Scott Matheson wrote:
>> Thomas
>>               i tried popup.addEventListener("OKTODELETE", deleteThisRecords)
>> 
>> all seems to be working, must have been a type-o
>> 
> 
> That's why you use static constants rather than string literals.
> 
>    popup.addEventListener(CustomEvent.EVENT_TYPE, deleteThisRecords);
> 
> regards,
> Peter
> 

Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you. 


Re: Events with itemRenders

Posted by Peter Ginneberge <p....@gmail.com>.

On 28/06/2015 20:24, Scott Matheson wrote:
> Thomas
>                i tried popup.addEventListener("OKTODELETE", deleteThisRecords)
>
> all seems to be working, must have been a type-o
>

That's why you use static constants rather than string literals.

	popup.addEventListener(CustomEvent.EVENT_TYPE, deleteThisRecords);

regards,
Peter

Re: Events with itemRenders

Posted by Scott Matheson <sm...@intralinks.com>.
Thomas
              i tried popup.addEventListener("OKTODELETE", deleteThisRecords)

all seems to be working, must have been a type-o 

thanks 

________________________________________
From: Frédéric THOMAS <we...@hotmail.com>
Sent: Sunday, June 28, 2015 6:52 PM
To: users@flex.apache.org
Subject: RE: Events with itemRenders

> var popup:Object ;
> popup = PopUpManager.createPopUp( FlexGlobals.topLevelApplication as DisplayObject, DeleteStudentConfirmation , true);
> PopUpManager.centerPopUp(popup as mx.core.IFlexDisplayObject);
> addEventListener("OKTODELETE", deleteThisRecords)

Did you try popup.addEventListener("OKTODELETE", deleteThisRecords); instead ?


Frédéric THOMAS


----------------------------------------
> Subject: Events with itemRenders
> From: smatheson@intralinks.com
> To: users@flex.apache.org
> Date: Sun, 28 Jun 2015 17:41:02 +0000
>
>
> Hi
>
> I have a grid with an itemRender, I want to centre the popup in the overall frame, so i am using " FlexGlobals.topLevelApplication as DisplayObject"
>
>
> this is snip on my code in the GridItemRender,
>
>
> my problem is the addEventListener is not picking up the event from "DeleteStudentConfirmation" popup
>
>
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:s="library://ns.adobe.com/flex/spark"
> width="5">
>
>
> private function deleteAlert():void{
>
>
> // open the PopUp Window as a modal popup window
> // and store it in a variable for later use
>
>
> var popup:Object ;
> popup = PopUpManager.createPopUp( FlexGlobals.topLevelApplication as DisplayObject, DeleteStudentConfirmation , true);
> PopUpManager.centerPopUp(popup as mx.core.IFlexDisplayObject);
> addEventListener("OKTODELETE", deleteThisRecords)
> }
>
>
>
> the popup
>
>
> private function deleteClosewindows():void {
> // PopUpManager.removePopUp(this);
>
> _ep = new Event("OKTODELETE", true);
> dispatchEvent(_ep);
> PopUpManager.removePopUp(this);
> }
>
> Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.

Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you. 


RE: Events with itemRenders

Posted by Frédéric THOMAS <we...@hotmail.com>.
> yes with out any luck, also tried this.

And that ?

popup:DeleteStudentConfirmation  = new DeleteStudentConfirmation ();
popup.addEventListener("OKTODELETE", deleteThisRecords);
PopUpManager.addPopUp(popup, FlexGlobals.topLevelApplication as DisplayObject, true);


Frédéric THOMAS


----------------------------------------
> Subject: Re: Events with itemRenders
> From: smatheson@intralinks.com
> To: users@flex.apache.org
> Date: Sun, 28 Jun 2015 18:13:03 +0000
>
> yes with out any luck, also tried this.
>
> ________________________________________
> From: Frédéric THOMAS <we...@hotmail.com>
> Sent: Sunday, June 28, 2015 6:52 PM
> To: users@flex.apache.org
> Subject: RE: Events with itemRenders
>
>> var popup:Object ;
>> popup = PopUpManager.createPopUp( FlexGlobals.topLevelApplication as DisplayObject, DeleteStudentConfirmation , true);
>> PopUpManager.centerPopUp(popup as mx.core.IFlexDisplayObject);
>> addEventListener("OKTODELETE", deleteThisRecords)
>
> Did you try popup.addEventListener("OKTODELETE", deleteThisRecords); instead ?
>
>
> Frédéric THOMAS
>
>
> ----------------------------------------
>> Subject: Events with itemRenders
>> From: smatheson@intralinks.com
>> To: users@flex.apache.org
>> Date: Sun, 28 Jun 2015 17:41:02 +0000
>>
>>
>> Hi
>>
>> I have a grid with an itemRender, I want to centre the popup in the overall frame, so i am using " FlexGlobals.topLevelApplication as DisplayObject"
>>
>>
>> this is snip on my code in the GridItemRender,
>>
>>
>> my problem is the addEventListener is not picking up the event from "DeleteStudentConfirmation" popup
>>
>>
>>
>>
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
>> xmlns:s="library://ns.adobe.com/flex/spark"
>> width="5">
>>
>>
>> private function deleteAlert():void{
>>
>>
>> // open the PopUp Window as a modal popup window
>> // and store it in a variable for later use
>>
>>
>> var popup:Object ;
>> popup = PopUpManager.createPopUp( FlexGlobals.topLevelApplication as DisplayObject, DeleteStudentConfirmation , true);
>> PopUpManager.centerPopUp(popup as mx.core.IFlexDisplayObject);
>> addEventListener("OKTODELETE", deleteThisRecords)
>> }
>>
>>
>>
>> the popup
>>
>>
>> private function deleteClosewindows():void {
>> // PopUpManager.removePopUp(this);
>>
>> _ep = new Event("OKTODELETE", true);
>> dispatchEvent(_ep);
>> PopUpManager.removePopUp(this);
>> }
>>
>> Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.
>
> Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.
>
 		 	   		  

Re: Events with itemRenders

Posted by Scott Matheson <sm...@intralinks.com>.
yes with out any luck, also tried this.

________________________________________
From: Frédéric THOMAS <we...@hotmail.com>
Sent: Sunday, June 28, 2015 6:52 PM
To: users@flex.apache.org
Subject: RE: Events with itemRenders

> var popup:Object ;
> popup = PopUpManager.createPopUp( FlexGlobals.topLevelApplication as DisplayObject, DeleteStudentConfirmation , true);
> PopUpManager.centerPopUp(popup as mx.core.IFlexDisplayObject);
> addEventListener("OKTODELETE", deleteThisRecords)

Did you try popup.addEventListener("OKTODELETE", deleteThisRecords); instead ?


Frédéric THOMAS


----------------------------------------
> Subject: Events with itemRenders
> From: smatheson@intralinks.com
> To: users@flex.apache.org
> Date: Sun, 28 Jun 2015 17:41:02 +0000
>
>
> Hi
>
> I have a grid with an itemRender, I want to centre the popup in the overall frame, so i am using " FlexGlobals.topLevelApplication as DisplayObject"
>
>
> this is snip on my code in the GridItemRender,
>
>
> my problem is the addEventListener is not picking up the event from "DeleteStudentConfirmation" popup
>
>
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:s="library://ns.adobe.com/flex/spark"
> width="5">
>
>
> private function deleteAlert():void{
>
>
> // open the PopUp Window as a modal popup window
> // and store it in a variable for later use
>
>
> var popup:Object ;
> popup = PopUpManager.createPopUp( FlexGlobals.topLevelApplication as DisplayObject, DeleteStudentConfirmation , true);
> PopUpManager.centerPopUp(popup as mx.core.IFlexDisplayObject);
> addEventListener("OKTODELETE", deleteThisRecords)
> }
>
>
>
> the popup
>
>
> private function deleteClosewindows():void {
> // PopUpManager.removePopUp(this);
>
> _ep = new Event("OKTODELETE", true);
> dispatchEvent(_ep);
> PopUpManager.removePopUp(this);
> }
>
> Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.

Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you. 


RE: Events with itemRenders

Posted by Frédéric THOMAS <we...@hotmail.com>.
> var popup:Object ;
> popup = PopUpManager.createPopUp( FlexGlobals.topLevelApplication as DisplayObject, DeleteStudentConfirmation , true);
> PopUpManager.centerPopUp(popup as mx.core.IFlexDisplayObject);
> addEventListener("OKTODELETE", deleteThisRecords)

Did you try popup.addEventListener("OKTODELETE", deleteThisRecords); instead ?


Frédéric THOMAS


----------------------------------------
> Subject: Events with itemRenders
> From: smatheson@intralinks.com
> To: users@flex.apache.org
> Date: Sun, 28 Jun 2015 17:41:02 +0000
>
>
> Hi
>
> I have a grid with an itemRender, I want to centre the popup in the overall frame, so i am using " FlexGlobals.topLevelApplication as DisplayObject"
>
>
> this is snip on my code in the GridItemRender,
>
>
> my problem is the addEventListener is not picking up the event from "DeleteStudentConfirmation" popup
>
>
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:s="library://ns.adobe.com/flex/spark"
> width="5">
>
>
> private function deleteAlert():void{
>
>
> // open the PopUp Window as a modal popup window
> // and store it in a variable for later use
>
>
> var popup:Object ;
> popup = PopUpManager.createPopUp( FlexGlobals.topLevelApplication as DisplayObject, DeleteStudentConfirmation , true);
> PopUpManager.centerPopUp(popup as mx.core.IFlexDisplayObject);
> addEventListener("OKTODELETE", deleteThisRecords)
> }
>
>
>
> the popup
>
>
> private function deleteClosewindows():void {
> // PopUpManager.removePopUp(this);
>
> _ep = new Event("OKTODELETE", true);
> dispatchEvent(_ep);
> PopUpManager.removePopUp(this);
> }
>
> Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.
 		 	   		  

Re: Events with itemRenders

Posted by "pkumar.flex" <pr...@gmail.com>.
Use   *popup.addEventListener("OKTODELETE"**, deleteThisRecords). *your
issue will be resolved.

On Sun, Jun 28, 2015 at 10:49 PM, Scott Matheson [via Apache Flex Users] <
ml-node+s2333346n10675h10@n4.nabble.com> wrote:

>
> Hi
>
>    I have a grid with an itemRender, I want to centre the popup in the
> overall frame, so i am using " FlexGlobals.topLevelApplication as
> DisplayObject"
>
>
> this is  snip on my code in the GridItemRender,
>
>
> my problem is the addEventListener is not picking up the event from
> "DeleteStudentConfirmation" popup
>
>
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
>                xmlns:s="library://ns.adobe.com/flex/spark"
>                width="5">
>
>
>       private function deleteAlert():void{
>
>
>             // open the PopUp Window as a modal popup window
>             // and store it in a variable for later use
>
>
>                var popup:Object ;
>                popup = PopUpManager.createPopUp(
> FlexGlobals.topLevelApplication as DisplayObject,
>  DeleteStudentConfirmation , true);
>                PopUpManager.centerPopUp(popup as
> mx.core.IFlexDisplayObject);
>                addEventListener("OKTODELETE", deleteThisRecords)
>       }
>
>
>
> the popup
>
>
> private function deleteClosewindows():void {
>    //     PopUpManager.removePopUp(this);
>
>    _ep = new Event("OKTODELETE", true);
>    dispatchEvent(_ep);
>    PopUpManager.removePopUp(this);
> }
>
> Disclaimer: This electronic mail and any attachments are confidential and
> may be privileged. If you are not the intended recipient, please notify the
> sender immediately by replying to this email, and destroy all copies of
> this email and any attachments. Thank you.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-flex-users.2333346.n4.nabble.com/Events-with-itemRenders-tp10675.html
>  To unsubscribe from Apache Flex Users, click here
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=cHJhc2hha3VtYXJAZ21haWwuY29tfDF8LTU0MTcyMzE2NA==>
> .
> NAML
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 
*Regards,*
Prashant Kumar* | *Mob.: +91 8408811225




--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Events-with-itemRenders-tp10675p10677.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.