Hey Shaun,
Thanks for the reply, and YES, it finally worked. It's always those little
typos that gotcha's!! The $'s were just taken from code relating to PHP
format; obviously, not needed.
I did find it interesting that I could also do this and skip the metadata
tag in the popup:
application.systemManager.addEventListener(CustomEvent.ON_TEST_CASE,handleUpdateFormSubmitted);
not sure if that's bad practice, but we have finally solved the popup window
to main scenario!!
shaun etherton wrote:
>
> Mark Hosny wrote:
>> Hey guys,
>>
>> I now know that my custom event is not working properly in my popup
>> window when listening for the event in the main app. When I do this, it
>> works:
>
> [snip]
>
>>
>> public static const ON_TEST_CASE:String = "formSubmitted";
>> public function CustomEvent($type:String, $params:Object,
>> $bubbles:Boolean = true, $cancelable:Boolean = true)
>> {
>> super($type, true, $cancelable);
>>
>> this.params = $params;
>> }
>
> [snip]
>
>
> You are dispatching an even with a "type" String value of
> "formSubmitted" and listening/registering for "formUpdate".
> Change the event constant to "formUpdate" and it will work again..
>
> <mx:Metadata>
> [Event(name="formUpdate",type="com.event.CustomEvent")]
> </mx:Metadata>
>
> MAIN APP
> application.systemManager.addEventListener("formUpdate",handleUpdateFormSubmitted);
>
>
> // event constants
> public static const ON_TEST_CASE:String = "formSubmitted";
>
> new CustomEvent(CustomEvent.ON_TEST_CASE,
> {
> memberID:memberID_txt.text
> }
> );
> this.dispatchEvent(evt);
>
>
> By the way, whats with the $ signs in the arg names?
>
> HTH.
>
> cheers,
> - shaun
>
>
--
View this message in context:
http://www.nabble.com/custom-event-not-working-in-popup-tp20033915p20034275.html
Sent from the FlexCoders mailing list archive at Nabble.com.