<?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: Emit not sent in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120128#M21633</link>
    <description>&lt;P&gt;I declared my component&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;'./drawTool/Screening_pmtools',
-----
], function (
----
Screening_pmtools,
-----&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then I called it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; this._drawPM = new Screening_pmtools()
      this.own(on(this._drawPM, "onDrawComplete", lang.hitch(this, function (graphics) {
        console.log(graphics)
        this._initToCreateAOIBuffer(graphics);
      })));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LefterisKoumis_0-1637790379964.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28226i7E1F6812048A54C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LefterisKoumis_0-1637790379964.png" alt="LefterisKoumis_0-1637790379964.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Nov 2021 21:46:26 GMT</pubDate>
    <dc:creator>LefterisKoumis</dc:creator>
    <dc:date>2021-11-24T21:46:26Z</dc:date>
    <item>
      <title>Emit not sent</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120078#M21626</link>
      <description>&lt;P&gt;I am trying to modify the Screening widget. In one of its subfolders, "drawtool" in the file drawtool,js it emits the completion of the draw by using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.emit("onDrawComplete", [graphics]);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to the widget.js&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.own(on(this._drawTool, "onDrawComplete", lang.hitch(this, function (graphics) {
        this._initToCreateAOIBuffer(graphics);
      })));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created my own file under the drawtool folder and I need to emit the same event from that file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.emit("onDrawComplete", [thePMPTgraphic]);    &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the emit is not working. The issue is not the thePMPTgraphic,&amp;nbsp; since it was tested.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas why the emit works in drawtools.js and not in the custom file? I have other functions in the custom file and are working properly.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 19:58:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120078#M21626</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2021-11-24T19:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Emit not sent</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120089#M21628</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/14521"&gt;@LefterisKoumis&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you added the&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'dojo/Evented' module to your define array and the declare array like the drawTool.js file has?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;this.emit comes from that module.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;A href="https://dojotoolkit.org/reference-guide/1.8/dojo/Evented.html" target="_blank"&gt;https://dojotoolkit.org/reference-guide/1.8/dojo/Evented.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 24 Nov 2021 20:22:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120089#M21628</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-11-24T20:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Emit not sent</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120095#M21629</link>
      <description>&lt;P&gt;THanks Robert. The Evented module is present and is still not working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 20:46:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120095#M21629</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2021-11-24T20:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Emit not sent</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120097#M21630</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/14521"&gt;@LefterisKoumis&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and you are sure Evented is part of your declare array too?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;return declare([BaseWidget, _WidgetsInTemplateMixin, Evented], {&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 24 Nov 2021 20:48:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120097#M21630</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-11-24T20:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Emit not sent</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120100#M21631</link>
      <description>&lt;P&gt;Positive.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LefterisKoumis_0-1637787284746.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28211i54B765136A581943/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LefterisKoumis_0-1637787284746.png" alt="LefterisKoumis_0-1637787284746.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 20:55:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120100#M21631</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2021-11-24T20:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Emit not sent</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120118#M21632</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/14521"&gt;@LefterisKoumis&lt;/a&gt;&lt;/P&gt;&lt;P&gt;OK that looks good so it must be the listener then.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      this.own(on(this._drawTool, "onDrawComplete", lang.hitch(this, function (graphics) {
        this._initToCreateAOIBuffer(graphics);
      })));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above code is only listening for the onDrawComplete event on the this_drawTool. So have you modified the widget.js to listen to the event on your custom component?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 21:14:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120118#M21632</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-11-24T21:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Emit not sent</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120128#M21633</link>
      <description>&lt;P&gt;I declared my component&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;'./drawTool/Screening_pmtools',
-----
], function (
----
Screening_pmtools,
-----&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then I called it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; this._drawPM = new Screening_pmtools()
      this.own(on(this._drawPM, "onDrawComplete", lang.hitch(this, function (graphics) {
        console.log(graphics)
        this._initToCreateAOIBuffer(graphics);
      })));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LefterisKoumis_0-1637790379964.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28226i7E1F6812048A54C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LefterisKoumis_0-1637790379964.png" alt="LefterisKoumis_0-1637790379964.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 21:46:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120128#M21633</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2021-11-24T21:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Emit not sent</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120134#M21634</link>
      <description>&lt;P&gt;hmm... Have you tried to console.log you component out to see if it is what it's suppose to be?&lt;/P&gt;&lt;LI-CODE lang="c"&gt;this._drawPM = new Screening_pmtools();
console.log(this._drawPM);&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 24 Nov 2021 21:45:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120134#M21634</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-11-24T21:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Emit not sent</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120156#M21635</link>
      <description>&lt;P&gt;I did now and it is empty. I don't understand why it is empty since it is declared properly as shown in previous posting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 22:16:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120156#M21635</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2021-11-24T22:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Emit not sent</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120165#M21636</link>
      <description>&lt;P&gt;does your "Screening_pmtools" constructor function have any arguments?&lt;/P&gt;&lt;P&gt;&amp;nbsp;Try putting some console.log or break points in your "Screening_pmtools"&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 22:31:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120165#M21636</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-11-24T22:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Emit not sent</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120217#M21637</link>
      <description>&lt;P&gt;No it doesn't have any arguments.&lt;/P&gt;&lt;P&gt;In the Screening_pmtools.js there is a function that does a query on a REST service and it results to a Lat, Long. Then, a point graphic is defined and added to a feature layer.&amp;nbsp; At last,&amp;nbsp; the fL is added to the map and the emit is performed. The point is plotted on the map but the emit never worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;-------
var thePoint = new Point(thecoords, new SpatialReference({
            wkid: 4326
          }));
          var pointWebMercator = webMercatorUtils.geographicToWebMercator(thePoint);
var thePMPTgraphic = new Graphic(pointWebMercator, symbolfoundstart);
this.PtLayerfromPM.add(thePMPTgraphic)
--------
this.map.addLayer(this.PtLayerfromPM);
this.emit("onDrawComplete", thePMPTgraphic);    &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 03:48:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120217#M21637</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2021-11-25T03:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Emit not sent</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120757#M21639</link>
      <description>&lt;P&gt;From the sounds of it nothing in the&amp;nbsp;&lt;SPAN&gt;Screening_pmtools.js file is working because it is not loading or has an error when loading. Have you modeled your&amp;nbsp;Screening_pmtools.js code after the drawTools.js file? Meaning it has a constructor function, etc, etc.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 13:31:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/emit-not-sent/m-p/1120757#M21639</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-11-29T13:31:20Z</dc:date>
    </item>
  </channel>
</rss>

