[flexcoders] event propagation in FLex

2009-07-30 Thread veena_kris2003
I have one class that generates the event.  I want another class to consume the 
event.  How do I do this?



Re: [flexcoders] event propagation in FLex

2009-07-30 Thread Pedro Sena
http://livedocs.adobe.com/flex/3/html/16_Event_handling_6.html

On Thu, Jul 30, 2009 at 1:05 PM, veena_kris2003 v.kri...@gmail.com wrote:



 I have one class that generates the event. I want another class to consume
 the event. How do I do this?

  




-- 
/**
* Pedro Sena
* Systems Architect
* Sun Certified Java Programmer
* Sun Certified Web Component Developer
*/


Re: [flexcoders] event propagation in FLex

2009-07-30 Thread veena pandit
How do you prevent the app from confusing two events?

On Thu, Jul 30, 2009 at 12:12 PM, Pedro Sena sena.pe...@gmail.com wrote:



 http://livedocs.adobe.com/flex/3/html/16_Event_handling_6.html

 On Thu, Jul 30, 2009 at 1:05 PM, veena_kris2003 v.kri...@gmail.comwrote:



 I have one class that generates the event. I want another class to consume
 the event. How do I do this?




 --
 /**
 * Pedro Sena
 * Systems Architect
 * Sun Certified Java Programmer
 * Sun Certified Web Component Developer
 */

 



[flexcoders] Event Propagation Problem (I think)

2008-09-29 Thread creativepragmatic
Hello everyone,

I am currently working on a set of time entry components that I hope 
to share with the open source community when finished.  The components 
are a time masking field that extends TextInput, a TimeStepper extends 
NumericStepper, a DateTimeChooser extends DateChooser and 
DateTimeField extends DateField.

My question concerns the TimeStepper and TimeField.  When I set the 
focus to the time field by clicking on it and then clicking on either 
arrow button to increase or decrease the time, I get the following 
error. It should also be noted that the first version of 
NumericStepper that extended UIComponent did not have this problem.

If anybody knows where and how to prevent the following stack trace, 
your help will be greatly appreciated.

Also, I am curious to know if anyone would find these components 
useful in their own projects.

Thank you in advance for any assistance,

Orville



TypeError: Error #1009: Cannot access a property or method of a null 
object reference.
at 
mx.controls::TextInput/drawFocus()[E:\dev\3.0.x\frameworks\projects\fr
amework\src\mx\controls\TextInput.as:1851]
at 
mx.core::UIComponent/focusOutHandler()[E:\dev\3.0.x\frameworks\project
s\framework\src\mx\core\UIComponent.as:8563]
at 
mx.controls::TextInput/focusOutHandler()[E:\dev\3.0.x\frameworks\proje
cts\framework\src\mx\controls\TextInput.as:2151]
at flash.display::Stage/set focus()
at 
mx.core::UITextField/setFocus()[E:\dev\3.0.x\frameworks\projects\frame
work\src\mx\core\UITextField.as:1531]
at 
com.m4tech.FlexLibraries.components::TimeInput/setFocus()[F:\Projects\
Flex\src\com\FlexLibraries\components\TimeInput.as:381]
at 
com.m4tech.FlexLibraries.components::TimeStepper/buttonClickHandler()[
F:\Projects\Flex\src\com\FlexLibraries\components\TimeStepper.as:398]




Re: [flexcoders] Event Propagation Problem (I think)

2008-09-29 Thread Igor Costa
Hum

Very strange error, if you share you're code maybe will be easy to everyone
help you. But try to debug and place a breakpoint where it's focus using
event.preventDefault() to see what's happen behind the scenes.

Regards
Igor Costa


On Sun, Sep 28, 2008 at 11:46 PM, creativepragmatic 
[EMAIL PROTECTED] wrote:

   Hello everyone,

 I am currently working on a set of time entry components that I hope
 to share with the open source community when finished. The components
 are a time masking field that extends TextInput, a TimeStepper extends
 NumericStepper, a DateTimeChooser extends DateChooser and
 DateTimeField extends DateField.

 My question concerns the TimeStepper and TimeField. When I set the
 focus to the time field by clicking on it and then clicking on either
 arrow button to increase or decrease the time, I get the following
 error. It should also be noted that the first version of
 NumericStepper that extended UIComponent did not have this problem.

 If anybody knows where and how to prevent the following stack trace,
 your help will be greatly appreciated.

 Also, I am curious to know if anyone would find these components
 useful in their own projects.

 Thank you in advance for any assistance,

 Orville

 TypeError: Error #1009: Cannot access a property or method of a null
 object reference.
 at
 mx.controls::TextInput/drawFocus()[E:\dev\3.0.x\frameworks\projects\fr
 amework\src\mx\controls\TextInput.as:1851]
 at
 mx.core::UIComponent/focusOutHandler()[E:\dev\3.0.x\frameworks\project
 s\framework\src\mx\core\UIComponent.as:8563]
 at
 mx.controls::TextInput/focusOutHandler()[E:\dev\3.0.x\frameworks\proje
 cts\framework\src\mx\controls\TextInput.as:2151]
 at flash.display::Stage/set focus()
 at
 mx.core::UITextField/setFocus()[E:\dev\3.0.x\frameworks\projects\frame
 work\src\mx\core\UITextField.as:1531]
 at
 com.m4tech.FlexLibraries.components::TimeInput/setFocus()[F:\Projects\
 Flex\src\com\FlexLibraries\components\TimeInput.as:381]
 at
 com.m4tech.FlexLibraries.components::TimeStepper/buttonClickHandler()[
 F:\Projects\Flex\src\com\FlexLibraries\components\TimeStepper.as:398]

  




-- 

Igor Costa
www.igorcosta.com
www.igorcosta.org


[flexcoders] Event Propagation

2008-08-18 Thread ron_mori
How to implement this type of event propagation?

My application component tree is roughly:

App
- main container
  - header container
- menu component 
  - body container
- form component

the user 'Saves' the entity in the form via the menu.  I want to
validate the form's required fields prior to the save, so the menu
component fires an AppMenuEvent - doValidation event.  The form
component, which has registered for that event, never receives the event.

I think this is because of the application component structure and
specifically because the form component is not in the component tree
from the event initiator (menu) to the App root node.  Is that correct?

How to resolve?

thanks



RE: [flexcoders] Event Propagation

2008-08-18 Thread Tracy Spratt
*directly* registered? As in:

myMenu.addEventListener(doValidation,validateForm)

 

Or are you counting on bubbling?

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ron_mori
Sent: Monday, August 18, 2008 5:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Event Propagation

 

How to implement this type of event propagation?

My application component tree is roughly:

App
- main container
- header container
- menu component 
- body container
- form component

the user 'Saves' the entity in the form via the menu. I want to
validate the form's required fields prior to the save, so the menu
component fires an AppMenuEvent - doValidation event. The form
component, which has registered for that event, never receives the
event.

I think this is because of the application component structure and
specifically because the form component is not in the component tree
from the event initiator (menu) to the App root node. Is that correct?

How to resolve?

thanks

 



[flexcoders] Event propagation

2006-09-12 Thread gustavo.saume
Hello yall...

im trying to comunicate controls with events, these controls are in 
diferent HBoxes.(they have diferent fathers in the tree hierarchy), 
but the control that listen doesnt work properly. i've tryed to do so 
in the bubbling and capture phase but nothing...

in a different approach i tryed to reach the root panel (successfully) 
and then from there dispatch a new event to all the childrens but no 
one seems to listen.

any comments??
Thanks...






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/