Flex: “1000: Ambiguous reference to variableName.”

05Nov2008

This code:

[Bindable]
private function get deWidth():Number
{
return this.dataProvider.width;
}

public function set deWidth( w:Number ):void
{
this.dataProvider.width = w;
}

.. seems fine, but when using the magic getter you’ll get (heh!) this compiler error “Ambiguous reference to deWidth”.

I’ve found found some blogposts referring to this as a bug. I don’t know if it’s a bug or not, but I know that the cause is that the getter is private and the setter is public - which doesn’t make sense.

So, to fix; either change your setter to private or your getter to public :-)

16 Comments

Joakim L 11/12/2008 at 09:52 AM

Thanks for the heads-up, it was driving me nuts!

John 12/15/2008 at 05:35 PM

you can get around this by specifying the accessor’s visibility first i.e.

private::deWidth = 99;

Exhistsit 11/28/2011 at 03:58 PM
Effedkekbiz 12/07/2011 at 12:52 AM

<a href=http://comunidad.terra.com/comentarios/index/id/300482/user/Propecia>propecia venta</a> yxn <a href=http://comprar-propecia-1mg.over-blog.es>propecia 1 mg</a> 1E <a href=http://comprare-propecia-1mg.over-blog.it>costo propecia</a> QW <a href=http://djhhjh.tigblog.org>propecia prix</a> rZQ <a href=http://propecia-bestellen.over-blog.de>propecia nebenwirkungen</a> Rk

Prom dresses UK 06/19/2012 at 02:52 AM

Seeking for the best deal on Cheap Prom Dresses, you can visit cheap-dress.co.uk to find the best advice on Prom Dresses UK for you. Go gorgeous UK Prom gowns for you!

wedding dress 08/10/2012 at 07:36 AM

Finally, wear your Cheap Wedding Dresses with confidence. This is your big day, and you should enjoy it looking elegant, gorgeous, and most of all, confident. Whatever Cheap Bridesmaid Dresses you choose, you’ll look beautiful if you work the look. Don’t feel as if you should be subtle or subdued (unless that would always be your preference). This is your big day, and you should rock your look with confidence Read More. Work your pregnancy glow, and enjoy your big day.

Leave a comment

Remember my personal information

Notify me of follow-up comments?