No one has done type checking like this before?  If not, oh well. :)

--- In [email protected], "gotgoose09" <[EMAIL PROTECTED]> wrote:
>
> My current code now loops through the children of a container and adds
> an event handler to each one to listen for a "change" event.
> 
> However, I want to only add event handlers to UIComponents that have
> some sort of value that the user can change.
> 
> Some examples of these components are: TextInput, ComboBox,
> RadioButton, CheckBox, ColorPicker, List, RichTextEditor, etc.
> 
> My current code is something like this: (simplified)
> 
> var component:UIComponent = container.getChildAt(i);
> if (component is Container)
> {
>   // add event handlers to the container's children
> }
> else if (component is UIComponent && "enabled" in component)
> {
>   // add an event handler to component
> }
> 
> Unfortunately, this doesn't work for all the various input controls.
> e.g. The RichTextEditor is a Container, so the code tries adding event
> handlers to it's children (I want an event handler on the actual
> RichTextEditor).
> 
> Is there a reliable way of detecting a user editable control?
> 
> Thanks in advance!
>


Reply via email to