<?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 Queries being completed out of order sometimes in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/queries-being-completed-out-of-order-sometimes/m-p/393578#M36314</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In my app it is possible to issue queries on the same layer in rapid enough succession that the issue of out-of-order execution of the response is an issue.&amp;nbsp; Is there any way of tagging the queries so they can be identified in the callback?&amp;nbsp; I saw on the IOS thread that an NSOperation associated with each query can be used for this purpose.&amp;nbsp; Is there any mechanism in the Javascript toolkit for identifying what query invoked the callback?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only thing I can think to do is to associated each query with a different (identical except that the function itself serves as an id) callback function, but that seems pretty lame.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rex Bradford&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Direct Relief International&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jan 2012 12:20:53 GMT</pubDate>
    <dc:creator>RexBradford</dc:creator>
    <dc:date>2012-01-27T12:20:53Z</dc:date>
    <item>
      <title>Queries being completed out of order sometimes</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/queries-being-completed-out-of-order-sometimes/m-p/393578#M36314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In my app it is possible to issue queries on the same layer in rapid enough succession that the issue of out-of-order execution of the response is an issue.&amp;nbsp; Is there any way of tagging the queries so they can be identified in the callback?&amp;nbsp; I saw on the IOS thread that an NSOperation associated with each query can be used for this purpose.&amp;nbsp; Is there any mechanism in the Javascript toolkit for identifying what query invoked the callback?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only thing I can think to do is to associated each query with a different (identical except that the function itself serves as an id) callback function, but that seems pretty lame.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rex Bradford&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Direct Relief International&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 12:20:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/queries-being-completed-out-of-order-sometimes/m-p/393578#M36314</guid>
      <dc:creator>RexBradford</dc:creator>
      <dc:date>2012-01-27T12:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Queries being completed out of order sometimes</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/queries-being-completed-out-of-order-sometimes/m-p/393579#M36315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In my app it is possible to issue queries on the same layer in rapid enough succession that the issue of out-of-order execution of the response is an issue.&amp;nbsp; Is there any way of tagging the queries so they can be identified in the callback?&amp;nbsp; I saw on the IOS thread that an NSOperation associated with each query can be used for this purpose.&amp;nbsp; Is there any mechanism in the Javascript toolkit for identifying what query invoked the callback?&lt;BR /&gt;&lt;BR /&gt;The only thing I can think to do is to associated each query with a different (identical except that the function itself serves as an id) callback function, but that seems pretty lame.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Rex Bradford&lt;BR /&gt;Direct Relief International&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead of different callbacks, why not just pass an additional identifying variable to the callback along with the resultset&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;we do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;task.execute(q, dojo.hitch(this, "searchCallback", layerData.name, layerdesc, layerData.titleField));&lt;/PRE&gt;&lt;SPAN&gt;.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;which allows us to use just one callback but have layer dependent functionality.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;our searchCallback then looks like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;searchCallback: function(layerId, layerdesc, titleField, featureSet) {&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 13:54:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/queries-being-completed-out-of-order-sometimes/m-p/393579#M36315</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2012-01-27T13:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Queries being completed out of order sometimes</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/queries-being-completed-out-of-order-sometimes/m-p/393580#M36316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Instead of different callbacks, why not just pass an additional identifying variable to the callback along with the resultset&lt;BR /&gt;&lt;BR /&gt;we do:&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;task.execute(q, dojo.hitch(this, "searchCallback", layerData.name, layerdesc, layerData.titleField));&lt;/PRE&gt;.&amp;nbsp; &lt;BR /&gt;which allows us to use just one callback but have layer dependent functionality.&lt;BR /&gt;&lt;BR /&gt;our searchCallback then looks like&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;searchCallback: function(layerId, layerdesc, titleField, featureSet) {&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ah, thanks.&amp;nbsp; I am not much of a dojo expert - the dojo.hitch is something I haven't used.&amp;nbsp; Will try it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rex Bradford&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Direct Relief International&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2012 14:49:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/queries-being-completed-out-of-order-sometimes/m-p/393580#M36316</guid>
      <dc:creator>RexBradford</dc:creator>
      <dc:date>2012-01-27T14:49:34Z</dc:date>
    </item>
  </channel>
</rss>

