Select to view content in your preferred language

Error 1180 Call to possibly undefined method

1392
2
10-01-2010 06:21 AM
PeteVitt
Frequent Contributor
I'm getting the error "1180 Call to possibly undefined method" before I compile my .mxml.  I'm trying to put the navigate to url into a link button from information in the attribute table.  Code is below

<fx:Script>
...
public function ClickLink(url:String):void
   {
    var theRpageURL:URLRequest=new URLRequest(url);
    navigateToURL(theRpageURL, "_blank");
   }
...
</fx:Script>

<esri:FeatureLayer id="featureLayer"
mode="onDemand"
outFields="[REACH,SHEET,URLPLAN]"
url="http://HappyServer/ArcGIS/rest/services/sari_drawings_Flex/MapServer/0">

...

<esri:infoWindowRenderer>
<fx:Component>
<mx:VBox backgroundColor="0xffffff"
  color="0x444444"
  label="{data.SHEET}">
  <mx:Label text="Reach: {data.REACH}"/>
  <mx:LinkButton label="View Drawings"
   textDecoration="underline" click="ClickLink(data.URLPLAN)"/>  //ERROR HERE
</mx:VBox>
</fx:Component>
</esri:infoWindowRenderer>

...
</esri:FeatureLayer>

what could be causing this? 

Thanks

Pete
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Pete,

   A Component is kind of in a world of it's own so it can not see the "ClickLink" function that you have outside of it. You need to add the fx script block inside the component and you should be good to go.
0 Kudos
PeteVitt
Frequent Contributor
That did the trick

Thanks Robert
0 Kudos