You know, I totally spaced on something and realized that my bindable
variables weren't attached to any object.  When I moved the
"testPercentage" into a VO, it all works as I'd expect.  I guess you
can't bind two-way in the way I originally tried.

If you still have some suggestions, or better explanation for what I
was doing, feel free to post.

Thanks

--- In [email protected], "Todd" <[EMAIL PROTECTED]> wrote:
>
> Hello All,
>   I'm having some issues where a property on a custom MXML control
> isn't firing to the bound parent:
> 
> Parent MXML
> [Bindable] public var testPercentage:Number;
> 
> <CustomTextControl modelValue="{testPercentage}" />
> 
> Inside the CustomTextControl, which is sublcassed from TextInput I have:
> [Bindable]                    
> public function set modelValue(value:Number):void{
>     _modelValue = value;
>     this.text = numberToPercentString(value);
>     // the following wasn't originally here, I added it
>     // because I read some Blogs with potential solutions
>     dispatchEvent(new Event("modelValueChanged"));            
> }
> public function get modelValue():Number
> {
>     return _modelValue;
> }
> 
> Somewhere else in the CustomTextControl, I call:
> _this.modelValue = .123456
>  
> My expected behavior is that the testPercentage would be updated, but
> it doesn't occur.
> 
> It seems this should be pretty straight forward, but I'm not getting
> anywhere with it.
> 
> I've tried a few things, but nothing I do seems to work.  I've looked
> at the MXML compiler output.  the Flex frameworks TextInput source
> code.  Afterall, I'm really trying to bind in a simialr way that text
> is, except to a typed Number. 
> 
> Any suggestions?  
> 
> Thanks a bunch.
>


Reply via email to