Jason:

I don't think that would get me what I need. 

Unfortunately the thing I want to do is determine if the textAlign 
property was explicitly set in the mxml.  If it is set in the mxml, I 
will leave it be, otherwise, I may change it.

Thanks for the input though.

Paul

--- In [email protected], "jmfillman" <[EMAIL PROTECTED]> wrote:
>
> Paul,
> 
> Off the top of my head, I can't think of any way to inheritantly 
> determine whether or not the default has been changed.
> 
> What I would suggest is setting a boolean variable, and then 
whenever 
> in your code you modify the textAlign property, change the variable 
> so you can check against it going forward.
> 
> Jason
> 
> --- In [email protected], "aceoohay" <pauls@> wrote:
> >
> > Jason:
> > 
> > That works great. Thanks for the info.
> > 
> > That still leaves one question, 
> > 
> > Is there a way of telling if the textAlign attribute is at its 
> > default (left) state or was it set in the mxml (or 
> programmatically) 
> > to "left"?
> > 
> > What I am trying to do is override default behavior in my 
extended 
> > TextInput, but if someone actually specifies textAlign="left" I 
> > don't want to override that.
> > 
> > Paul
> > 
> > --- In [email protected], "jmfillman" <jmfillman@> wrote:
> > >
> > > Paul,
> > > 
> > > I believe that the answer to your original question is that you 
> > need 
> > > to use setStyle().
> > > 
> > > For example:
> > > 
> > > <mx:TextInput id="myTextInput"/>
> > > 
> > > private function textAlign():void{
> > >      myTextInput.setStyle("textAlign", "center");
> > > }
> > > 
> > > Jason
> > > --- In [email protected], "aceoohay" <pauls@> wrote:
> > > >
> > > > Well I found the answer, but I have another question or two.
> > > > 
> > > > The answer is this.nonInheritingStyles.textAlign.
> > > > 
> > > > One new question is how can I tell whether this value is the 
> > > default 
> > > > value, or a value set by the mxml?
> > > > 
> > > > If I change the value during run time, it doesn't seem to 
honor 
> > the 
> > > > new value. How can I go about making this happen?
> > > > 
> > > > Paul
> > > > 
> > > > --- In [email protected], "aceoohay" <pauls@> wrote:
> > > > >
> > > > > I am trying to extend the TextInput class and one thing I 
> > would 
> > > > like 
> > > > > to do is check the current value of the textAlign 
attribute, 
> > and 
> > > > > change it if needed.
> > > > > 
> > > > > I access the other attributes that I need using the syntax 
> > > > > this.attributeName such as this.maxChars, I cannot, however 
> > > access 
> > > > > this.textAlign. The compiler barfs with error 1119 Access 
of 
> > > > possibly 
> > > > > undefined property...
> > > > > 
> > > > > It also doesn't appear in the intellisense for the "this" 
> > keyword 
> > > > in 
> > > > > my extended class. It does appear in the intellisense for 
the 
> > > > > <mx:TextInput> tag.
> > > > > 
> > > > > Any ideas?
> > > > > 
> > > > > Paul
> > > > >
> > > >
> > >
> >
>


Reply via email to