i would just use getters/setters i think that is the only way

public function set myProperty(value:Object):void{
    textInput.someProperty=value;
}


----- Original Message ----
From: aceoohay <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Monday, February 18, 2008 5:18:42 PM
Subject: [flexcoders] Re: Extending DateField...

Sherif:

Thanks, this gets me part way there.

What I created was;

override protected function createChildren( ):void
{
super.createChildre n();
removeChild( textInput) ;

if(textInput)
{
textInput = new ValidatedTextInput( );
addChild(textInput) ;
}
}

This actually calls my component ValidateTextInput( ) and does 
validation.

The reason I say part way, is that I have added a number of 
properties to my component ValidateTextInput that I would like to 
become visible in my new DateField's mxml definition. 

Any Idea on how to do this?

Paul
--- In [EMAIL PROTECTED] ups.com, Sherif Abdou <[EMAIL PROTECTED] ..> 
wrote:
>
> try doing this, extend the DataField, override the textInput in 
the createChildren
> override protected function createChildren( ):void{
> super.createChildre n();
> removeChild( textInput) ;
> if(textInput) {
> textInput = new TextInput();
> textInput.width= 100;
> textInput.height= 100;
> addChild(textInput) ;
> }
> }
> 
> 
> 
> ----- Original Message ----
> From: aceoohay <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED] ups.com
> Sent: Monday, February 18, 2008 11:21:13 AM
> Subject: [flexcoders] Re: Extending DateField...
> 
> I thought I would restate this question if for no other reason 
than to 
> pop it to the top of the list.
> 
> Is there a way of changing the TextInput component that the 
DateField 
> component uses to my own TextInput type component?
> 
> Paul
> 
> --- In [EMAIL PROTECTED] ups.com, "aceoohay" <pauls@> wrote:
> >
> > I have extended the TextInput class. Some of the features I have 
> added 
> > include data validation, of which date validation is one.
> > 
> > In some cases I would like to use the DateField to get dates. I 
> always 
> > make the date field editable, I would like to reuse my extended 
> > TextInput component by having the DatefField call that instead 
of 
> the 
> > standard TextInput component.
> > 
> > Any ideas on how to do this?
> > 
> > Paul
> >
> 
> 
> 
> 
> 
> 
____________ _________ _________ _________ _________ _________ _
____________ ___
> Looking for last minute shopping deals? 
> Find them fast with Yahoo! Search. 
http://tools. search.yahoo. com/newsearch/ category. php?
category=shopping
>





      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

Reply via email to