<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Widget type casting in SFV 2.0 in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/widget-type-casting-in-sfv-2-0/m-p/400327#M9350</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;James,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I ran into this also and found that you can not do the cast to searchwidget like we did in 1.3. The work around is to just define sw as type object and it works, you just will not get the autocomplete or intellisence in the ide.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Aug 2010 14:14:30 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2010-08-10T14:14:30Z</dc:date>
    <item>
      <title>Widget type casting in SFV 2.0</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/widget-type-casting-in-sfv-2-0/m-p/400326#M9349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In SFV 1.3, you could get the search widget from the application as a IBaseWidget and then re-type it as a search widget (this was shown in the postings for passing url parameters to your application). When I try to do this in SFV 2.0, I can get the searchwidget typed as a IBaseWidget, but get a null value when trying to retype it as a search widget. Has anyone be able to do this in 2.0? Here is the snippet of code with the variable values I get in the Flash builder debugger:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var bw:IBaseWidget = WM.widgetTable.toArray()[0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; value of bw = widgets.Search.SearchWidget (@9049ae1) //from the debugger&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var sw:SearchWidget = bw as SearchWidget;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; value of sw = null // if I try to directly declare it, it says it cannot by cast as a search widget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Re-casting the base widget as a search widget works in SFV1.3.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 13:43:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/widget-type-casting-in-sfv-2-0/m-p/400326#M9349</guid>
      <dc:creator>JamesPosnick</dc:creator>
      <dc:date>2010-08-10T13:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Widget type casting in SFV 2.0</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/widget-type-casting-in-sfv-2-0/m-p/400327#M9350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;James,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I ran into this also and found that you can not do the cast to searchwidget like we did in 1.3. The work around is to just define sw as type object and it works, you just will not get the autocomplete or intellisence in the ide.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 14:14:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/widget-type-casting-in-sfv-2-0/m-p/400327#M9350</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-08-10T14:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Widget type casting in SFV 2.0</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/widget-type-casting-in-sfv-2-0/m-p/400328#M9351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Robert. Defining it as an object seems to work fine.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 14:24:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/widget-type-casting-in-sfv-2-0/m-p/400328#M9351</guid>
      <dc:creator>JamesPosnick</dc:creator>
      <dc:date>2010-08-10T14:24:24Z</dc:date>
    </item>
  </channel>
</rss>

