<?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 About functions in another components. in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/about-functions-in-another-components/m-p/119508#M2850</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Im having a problem with this, i hope u guys can help me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a main app called Lllayllay where i put some title windows adding them as mx component binded with some functions about arcgis map and layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now im trying to change the title windows to a popup because i cannot drag them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To do that i read something that i need to change those title windows objects to a mxml component, so when i tried to do that i figure out that my functions binded in the main file the new componenr (the other mxml file) cannot be used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, how can i call functions from a mxml component that they are being used in the main file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An example is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Main app:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A button with click event and a click function to do something with arcgis develop&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TWindowComp.mxml&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt; &amp;lt;mx:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:s="library://ns.adobe.com/flex/spark"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300" xmlns:components="org.example.components.*"&amp;gt;&amp;nbsp; &amp;lt;fx:Script&amp;gt; &amp;nbsp; &amp;lt;![CDATA[ &amp;nbsp;&amp;nbsp; import mx.core.Application; &amp;nbsp;&amp;nbsp; import mx.core.FlexGlobals; &amp;nbsp;&amp;nbsp; import spark.components.Application; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; protected function exExcelMedidores_clickHandler(event:MouseEvent):void &amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; // TODO Auto-generated method stub &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; ]]&amp;gt;&amp;nbsp; &amp;lt;/fx:Script&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:Declarations&amp;gt; &amp;nbsp; &amp;lt;!-- Place non-visual elements (e.g., services, value objects) here --&amp;gt;&amp;nbsp; &amp;lt;/fx:Declarations&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:VGroup width="100%" bottom="5" height="100%"&amp;gt; &amp;nbsp; &amp;lt;s:HGroup width="100%" verticalAlign="middle"&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;components:SearchBar id="searchBar" width="100%"/&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;s:Button id="exExcelMedidores" click="generateXLS()"&amp;nbsp; label="Exportar" width="20%" height="22" /&amp;gt; &amp;nbsp; &amp;lt;/s:HGroup&amp;gt; &amp;nbsp; &amp;lt;s:DataGrid id="dgridEquipos" resizableColumns="true" skinClass="dataGridSkin" sortableColumns="true" contentBackgroundAlpha="1"&amp;nbsp; width="100%" height="90%" visible="true" editable="false" bottom="1" click="dgridEquipos_clickHandler(event)"&amp;nbsp;&amp;nbsp; &amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;s:columns&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:ArrayList&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:GridColumn dataField="id_medidor" headerText="ID Equipo"&amp;gt;&amp;lt;/s:GridColumn&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:GridColumn dataField="nis" headerText="NIS"&amp;gt;&amp;lt;/s:GridColumn&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:GridColumn dataField="luminarias" headerText="Cant. Luminarias"&amp;gt;&amp;lt;/s:GridColumn&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:GridColumn dataField="tramos_ap" headerText="Cant. Tramos"&amp;gt;&amp;lt;/s:GridColumn&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:GridColumn dataField="tipo_equipo" headerText="Tipo"&amp;gt;&amp;lt;/s:GridColumn&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/s:ArrayList&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;/s:columns&amp;gt; &amp;nbsp; &amp;lt;/s:DataGrid&amp;gt;&amp;nbsp; &amp;lt;/s:VGroup&amp;gt; &amp;lt;/mx:TitleWindow&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The generateXLS function and the dgridEquipos_clickHandler(event) i have them in the main app and i cannot put them out of the main file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So how can i access them?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thx in advice!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jun 2014 13:48:26 GMT</pubDate>
    <dc:creator>EvelynHernandez</dc:creator>
    <dc:date>2014-06-26T13:48:26Z</dc:date>
    <item>
      <title>About functions in another components.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/about-functions-in-another-components/m-p/119508#M2850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Im having a problem with this, i hope u guys can help me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a main app called Lllayllay where i put some title windows adding them as mx component binded with some functions about arcgis map and layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now im trying to change the title windows to a popup because i cannot drag them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To do that i read something that i need to change those title windows objects to a mxml component, so when i tried to do that i figure out that my functions binded in the main file the new componenr (the other mxml file) cannot be used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, how can i call functions from a mxml component that they are being used in the main file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An example is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Main app:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A button with click event and a click function to do something with arcgis develop&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TWindowComp.mxml&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt; &amp;lt;mx:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:s="library://ns.adobe.com/flex/spark"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300" xmlns:components="org.example.components.*"&amp;gt;&amp;nbsp; &amp;lt;fx:Script&amp;gt; &amp;nbsp; &amp;lt;![CDATA[ &amp;nbsp;&amp;nbsp; import mx.core.Application; &amp;nbsp;&amp;nbsp; import mx.core.FlexGlobals; &amp;nbsp;&amp;nbsp; import spark.components.Application; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; protected function exExcelMedidores_clickHandler(event:MouseEvent):void &amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp; // TODO Auto-generated method stub &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; ]]&amp;gt;&amp;nbsp; &amp;lt;/fx:Script&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fx:Declarations&amp;gt; &amp;nbsp; &amp;lt;!-- Place non-visual elements (e.g., services, value objects) here --&amp;gt;&amp;nbsp; &amp;lt;/fx:Declarations&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:VGroup width="100%" bottom="5" height="100%"&amp;gt; &amp;nbsp; &amp;lt;s:HGroup width="100%" verticalAlign="middle"&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;components:SearchBar id="searchBar" width="100%"/&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;s:Button id="exExcelMedidores" click="generateXLS()"&amp;nbsp; label="Exportar" width="20%" height="22" /&amp;gt; &amp;nbsp; &amp;lt;/s:HGroup&amp;gt; &amp;nbsp; &amp;lt;s:DataGrid id="dgridEquipos" resizableColumns="true" skinClass="dataGridSkin" sortableColumns="true" contentBackgroundAlpha="1"&amp;nbsp; width="100%" height="90%" visible="true" editable="false" bottom="1" click="dgridEquipos_clickHandler(event)"&amp;nbsp;&amp;nbsp; &amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;s:columns&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:ArrayList&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:GridColumn dataField="id_medidor" headerText="ID Equipo"&amp;gt;&amp;lt;/s:GridColumn&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:GridColumn dataField="nis" headerText="NIS"&amp;gt;&amp;lt;/s:GridColumn&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:GridColumn dataField="luminarias" headerText="Cant. Luminarias"&amp;gt;&amp;lt;/s:GridColumn&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:GridColumn dataField="tramos_ap" headerText="Cant. Tramos"&amp;gt;&amp;lt;/s:GridColumn&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:GridColumn dataField="tipo_equipo" headerText="Tipo"&amp;gt;&amp;lt;/s:GridColumn&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/s:ArrayList&amp;gt; &amp;nbsp;&amp;nbsp; &amp;lt;/s:columns&amp;gt; &amp;nbsp; &amp;lt;/s:DataGrid&amp;gt;&amp;nbsp; &amp;lt;/s:VGroup&amp;gt; &amp;lt;/mx:TitleWindow&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The generateXLS function and the dgridEquipos_clickHandler(event) i have them in the main app and i cannot put them out of the main file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So how can i access them?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thx in advice!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2014 13:48:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/about-functions-in-another-components/m-p/119508#M2850</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2014-06-26T13:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: About functions in another components.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/about-functions-in-another-components/m-p/119509#M2851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I solve the problem putting some event listeners on the main app.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thx anyways.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2014 15:19:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/about-functions-in-another-components/m-p/119509#M2851</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2014-06-26T15:19:21Z</dc:date>
    </item>
  </channel>
</rss>

