<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>jeff germain's blog</title>
	<atom:link href="http://jeffgermain.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jeffgermain.wordpress.com</link>
	<description>Using Gis.Software.Development;</description>
	<lastBuildDate>Thu, 08 Dec 2011 00:38:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jeffgermain.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>jeff germain's blog</title>
		<link>http://jeffgermain.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jeffgermain.wordpress.com/osd.xml" title="jeff germain&#039;s blog" />
	<atom:link rel='hub' href='http://jeffgermain.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Validating Edit Operations with ArcGIS Flex API</title>
		<link>http://jeffgermain.wordpress.com/2011/08/03/validating-edit-operations-with-arcgis-flex-api/</link>
		<comments>http://jeffgermain.wordpress.com/2011/08/03/validating-edit-operations-with-arcgis-flex-api/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 16:34:39 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[ArcGIS API for Flex]]></category>
		<category><![CDATA[ArcGIS Viewer for Flex]]></category>
		<category><![CDATA[Editor]]></category>

		<guid isPermaLink="false">https://jeffgermain.wordpress.com/2011/08/03/validating-edit-operations-with-arcgis-flex-api/</guid>
		<description><![CDATA[FeatureLayer edits at ArcGIS Flex API 2.4 and below are live. That is, if you move a vertex or modify a field value the underlying FeatureClass is updated instantly. Here’s a quick and dirty way to validate edit operations forcing the user to accept or cancel their edit actions. Note a myriad of ways to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=111&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>FeatureLayer edits at <a href="http://help.arcgis.com/en/webapi/flex/apiref/index.html" target="_blank">ArcGIS Flex API 2.4 and below</a> are live. That is, if you move a vertex or modify a field value the underlying FeatureClass is updated instantly. Here’s a quick and dirty way to validate edit operations forcing the user to accept or cancel their edit actions. <em>Note a myriad of ways to implement edit validation exist out there, this is just one of them.</em> </p>
<p>For this example I’ll handle <strong>delete operations</strong> and get confirmation from the user before the edits are committed to the server. I’ll also use some Esri sample services.</p>
<p><strong>Workflow:</strong>&#160; Select one or more fire perimeters and press the Delete button on the attribute inspector OR click Delete key. Choose Yes or No in the confirmation dialog. As shown in the following figure.</p>
<p><a href="http://jeffgermain.files.wordpress.com/2011/08/confirm_deletes.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="confirm_deletes" border="0" alt="confirm_deletes" src="http://jeffgermain.files.wordpress.com/2011/08/confirm_deletes_thumb.png?w=380&#038;h=254" width="380" height="254" /></a></p>
<p>The code to make this work is pretty simple. Essentially, clicking delete raises the <a href="http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html#event:editsStarting" target="_blank">editsStarting</a> event on the fire perimeters <a href="http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html" target="_blank">featurelayer</a>. This event occurs before edits have been sent to the server. In this event handler we first clone the event, then cancel the event. We clone and cancel the event so that we can send the edits to the server ONLY if user OK’s the action. Then we pop a dialog to get user confirmation. Based on dialog result, we call <a href="http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html#applyEdits()" target="_blank">applyEdits</a> passing in the deleted features from the cloned event. Done.</p>
<p>See the code below for details.</p>
<h6>ValidateEditsDemo.mxml (<a href="http://www.box.net/shared/mt4hry1ox827stx2bcnv" target="_blank">Download here</a>)</h6>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:&#039;direction:ltr;max-height:1000px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum1">   1:</span> <span style="color:#0000ff;">&lt;?</span><span style="color:#800000;">xml</span> <span style="color:#ff0000;">version</span><span style="color:#0000ff;">=&quot;1.0&quot;</span> <span style="color:#ff0000;">encoding</span><span style="color:#0000ff;">=&quot;utf-8&quot;</span>?<span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum2">   2:</span> <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">s:Application</span> <span style="color:#ff0000;">xmlns:fx</span><span style="color:#0000ff;">=&quot;http://ns.adobe.com/mxml/2009&quot;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum3">   3:</span>                <span style="color:#ff0000;">xmlns:s</span><span style="color:#0000ff;">=&quot;library://ns.adobe.com/flex/spark&quot;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum4">   4:</span>                <span style="color:#ff0000;">xmlns:esri</span><span style="color:#0000ff;">=&quot;http://www.esri.com/2008/ags&quot;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum5">   5:</span>                <span style="color:#ff0000;">initialize</span><span style="color:#0000ff;">=&quot;application_initializeHandler(event)&quot;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum6">   6:</span>                <span style="color:#ff0000;">pageTitle</span><span style="color:#0000ff;">=&quot;Validate Edits Demo&quot;</span><span style="color:#0000ff;">&gt;</span>    </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum7">   7:</span>     <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">s:layout</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum8">   8:</span>         <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">s:HorizontalLayout</span><span style="color:#0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum9">   9:</span>     <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">s:layout</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum10">  10:</span>     </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum11">  11:</span>     <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">fx:Style</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum12">  12:</span>         @namespace esri &quot;http://www.esri.com/2008/ags&quot;;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum13">  13:</span>         </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum14">  14:</span>         esri|InfoWindow</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum15">  15:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum16">  16:</span>             background-color : #FFFFFF;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum17">  17:</span>             border-thickness : 2;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum18">  18:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum19">  19:</span>     <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">fx:Style</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum20">  20:</span>     </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum21">  21:</span>     <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">fx:Script</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum22">  22:</span>         <span style="color:#0000ff;">&lt;!</span>[CDATA[</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum23">  23:</span> import com.esri.ags.Graphic;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum24">  24:</span> import com.esri.ags.events.FeatureLayerEvent;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum25">  25:</span> import com.esri.ags.tasks.GeometryService;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum26">  26:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum27">  27:</span> import mx.controls.Alert;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum28">  28:</span> import mx.events.CloseEvent;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum29">  29:</span> import mx.events.FlexEvent;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum30">  30:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum31">  31:</span> protected function application_initializeHandler(event:FlexEvent):void</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum32">  32:</span> {</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum33">  33:</span>     myEditor.featureLayers = [ fireAreas ];</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum34">  34:</span> }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum35">  35:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum36">  36:</span> private var _confirmDeletes:Boolean = true;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum37">  37:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum38">  38:</span> protected function fireAreas_editsStartingHandler(event:FeatureLayerEvent):void</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum39">  39:</span> {</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum40">  40:</span>     if(event.deletes &amp;&amp; event.deletes.length <span style="color:#0000ff;">&gt;</span> 0)</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum41">  41:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum42">  42:</span>         if(_confirmDeletes)</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum43">  43:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum44">  44:</span>             // Clone this event, then cancel it so we can get user </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum45">  45:</span>             // confirmation and apply edits later</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum46">  46:</span>             const eventClone:FeatureLayerEvent = </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum47">  47:</span>                 event.clone() as FeatureLayerEvent;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum48">  48:</span>             </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum49">  49:</span>             // Cancel event</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum50">  50:</span>             event.preventDefault();</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum51">  51:</span>             </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum52">  52:</span>             // List OIDs</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum53">  53:</span>             var oids:String = &quot;&quot;;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum54">  54:</span>             var oid:String;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum55">  55:</span>             for each (var g:Graphic in event.deletes)</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum56">  56:</span>             {</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum57">  57:</span>                 oid = g.attributes.objectid.toString();</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum58">  58:</span>                 oids = (oids.length == 0) </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum59">  59:</span>                     ? oid : oids + &quot;, &quot; + oid;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum60">  60:</span>             }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum61">  61:</span>             </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum62">  62:</span>             // Confirm deletes</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum63">  63:</span>             const msg:String = </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum64">  64:</span>                 &quot;Are you sure you want to delete these features?\n&quot; +</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum65">  65:</span>                 &quot;OBJECTIDs: &quot; + oids;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum66">  66:</span>             const title:String = </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum67">  67:</span>                 (event.deletes.length <span style="color:#0000ff;">&gt;</span> 1) ? &quot;Confirm Deletes&quot; : &quot;Confirm Delete&quot;;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum68">  68:</span>             Alert.show(msg, title, 3, this, confirmHandler);</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum69">  69:</span>             </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum70">  70:</span>             function confirmHandler(closeEvent:CloseEvent):void</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum71">  71:</span>             {</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum72">  72:</span>                 if(closeEvent.detail == Alert.YES)</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum73">  73:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum74">  74:</span>                     // Apply edits without confirmation</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum75">  75:</span>                     _confirmDeletes = false;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum76">  76:</span>                     eventClone.featureLayer.applyEdits(null, null, eventClone.deletes);</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum77">  77:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum78">  78:</span>             }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum79">  79:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum80">  80:</span>         else</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum81">  81:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum82">  82:</span>             // Reset confirmation flag</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum83">  83:</span>             _confirmDeletes = true;</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum84">  84:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum85">  85:</span>     }    </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum86">  86:</span> }</pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum87">  87:</span>         ]]<span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum88">  88:</span>     <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">fx:Script</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum89">  89:</span>     </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum90">  90:</span>     <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">s:VGroup</span> <span style="color:#ff0000;">width</span><span style="color:#0000ff;">=&quot;328&quot;</span> <span style="color:#ff0000;">height</span><span style="color:#0000ff;">=&quot;100%&quot;</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum91">  91:</span>         <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">esri:Editor</span> <span style="color:#ff0000;">id</span><span style="color:#0000ff;">=&quot;myEditor&quot;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum92">  92:</span>                      <span style="color:#ff0000;">geometryService</span><span style="color:#0000ff;">=&quot;{new GeometryService('http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer')}&quot;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum93">  93:</span>                      <span style="color:#ff0000;">map</span><span style="color:#0000ff;">=&quot;{myMap}&quot;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum94">  94:</span>                      <span style="color:#ff0000;">toolbarVisible</span><span style="color:#0000ff;">=&quot;true&quot;</span><span style="color:#0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum95">  95:</span>         <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">s:Rect</span> <span style="color:#ff0000;">height</span><span style="color:#0000ff;">=&quot;100%&quot;</span><span style="color:#0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum96">  96:</span>     <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">s:VGroup</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum97">  97:</span>     <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">esri:Map</span> <span style="color:#ff0000;">id</span><span style="color:#0000ff;">=&quot;myMap&quot;</span> <span style="color:#ff0000;">wrapAround180</span><span style="color:#0000ff;">=&quot;true&quot;</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum98">  98:</span>         <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">esri:extent</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum99">  99:</span>             <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">esri:Extent</span> <span style="color:#ff0000;">id</span><span style="color:#0000ff;">=&quot;sheepfire&quot;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum100"> 100:</span>                          <span style="color:#ff0000;">xmin</span><span style="color:#0000ff;">=&quot;-13144000&quot;</span> <span style="color:#ff0000;">ymin</span><span style="color:#0000ff;">=&quot;4033000&quot;</span> <span style="color:#ff0000;">xmax</span><span style="color:#0000ff;">=&quot;-13066000&quot;</span> <span style="color:#ff0000;">ymax</span><span style="color:#0000ff;">=&quot;4099000&quot;</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum101"> 101:</span>                 <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">esri:SpatialReference</span> <span style="color:#ff0000;">wkid</span><span style="color:#0000ff;">=&quot;102100&quot;</span><span style="color:#0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum102"> 102:</span>             <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">esri:Extent</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum103"> 103:</span>         <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">esri:extent</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum104"> 104:</span>         <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">esri:ArcGISTiledMapServiceLayer</span> <span style="color:#ff0000;">url</span><span style="color:#0000ff;">=&quot;http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer&quot;</span><span style="color:#0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum105"> 105:</span>         <span style="color:#0000ff;">&lt;</span><span style="color:#800000;">esri:FeatureLayer</span> <span style="color:#ff0000;">id</span><span style="color:#0000ff;">=&quot;fireAreas&quot;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum106"> 106:</span>                            <span style="color:#ff0000;">mode</span><span style="color:#0000ff;">=&quot;snapshot&quot;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum107"> 107:</span>                            <span style="color:#ff0000;">outFields</span><span style="color:#0000ff;">=&quot;*&quot;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum108"> 108:</span>                            <span style="color:#ff0000;">url</span><span style="color:#0000ff;">=&quot;http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/2&quot;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum109"> 109:</span>                            <span style="color:#ff0000;">editsStarting</span><span style="color:#0000ff;">=&quot;fireAreas_editsStartingHandler(event)&quot;</span><span style="color:#0000ff;">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum110"> 110:</span>     <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">esri:Map</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum111"> 111:</span>     </pre>
<p><!--CRLF--></p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:&#039;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum112"> 112:</span> <span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">s:Application</span><span style="color:#0000ff;">&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<h6>ValidateEditsDemo.mxml (<a href="http://www.box.net/shared/mt4hry1ox827stx2bcnv" target="_blank">Download here</a>)</h6>
<p>Let me know what other ways you’ve implemented edit validation!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffgermain.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffgermain.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffgermain.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffgermain.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/111/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=111&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2011/08/03/validating-edit-operations-with-arcgis-flex-api/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>

		<media:content url="http://jeffgermain.files.wordpress.com/2011/08/confirm_deletes_thumb.png" medium="image">
			<media:title type="html">confirm_deletes</media:title>
		</media:content>
	</item>
		<item>
		<title>Bug in ArcGIS API for Flex InfoWindow Workaround</title>
		<link>http://jeffgermain.wordpress.com/2011/05/05/bug-in-arcgis-api-for-flex-infowindow-workaround/</link>
		<comments>http://jeffgermain.wordpress.com/2011/05/05/bug-in-arcgis-api-for-flex-infowindow-workaround/#comments</comments>
		<pubDate>Thu, 05 May 2011 18:16:36 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[ArcGIS API for Flex]]></category>
		<category><![CDATA[ArcGIS Server]]></category>
		<category><![CDATA[ArcGIS Viewer for Flex]]></category>
		<category><![CDATA[bug]]></category>

		<guid isPermaLink="false">https://jeffgermain.wordpress.com/2011/05/05/bug-in-arcgis-api-for-flex-infowindow-workaround/</guid>
		<description><![CDATA[Update:  I&#8217;ve added examples for ArcGIS Viewer API for Flex 2.4 and 2.3.1 at the bottom of this post I’m a big fan of the new PopUpRenderer and ability to use popups on an ArcGISDynamicMapServiceLayer with little code. They’re especially nice when working within an ArcGIS Viewer for Flex app as they’re so configurable. However, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=107&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h4><span style="color:#ff0000;">Update:  I&#8217;ve added examples for ArcGIS Viewer API for Flex 2.4 and 2.3.1 at the bottom of this post</span></h4>
<p>I’m a big fan of the new <a href="http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/webmap/PopUpRenderer.html" target="_blank">PopUpRenderer</a> and ability to use popups on an ArcGISDynamicMapServiceLayer with little code. They’re especially nice when working within an ArcGIS Viewer for Flex app as they’re so <a href="http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/Pop_up_configuration_files/01m30000002q000000/" target="_blank">configurable</a>. However, I’ve discovered one wrinkle though. The layer does not clear the title (<span style="font-family:'Courier New';">infoWindow.label</span>) property, thus retaining any previous title. The default PopUpRenderer does not use the <span style="font-family:'Courier New';">infoWindow.label</span> property. It simply ignores it. Take the following examples.</p>
<p>First, I’ll click on a graphic, a tweet in this case. The tweet content is actually a component instance that is set via <span style="font-family:'Courier New';">map.infoWindowContent</span>. We also set the <span style="font-family:'Courier New';">map.infoWindow.label </span>with the tweet owner.</p>
<p><a href="http://jeffgermain.files.wordpress.com/2011/05/infowindow_tweet.jpg"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="infowindow_tweet" src="http://jeffgermain.files.wordpress.com/2011/05/infowindow_tweet_thumb.jpg?w=508&#038;h=301" alt="infowindow_tweet" width="508" height="301" border="0" /></a></p>
<p>Next, we click on a feature from an ArcGISDynamicMapServiceLayer which displays the popup using the configured PopUpRenderer. Notice the tweet title is persisted. This is regardless if we close the InfoWindow and click another feature. And this isn’t limited to ArcGISDynamicMapServiceLayers. FeatureLayers are affected too.</p>
<p><a href="http://jeffgermain.files.wordpress.com/2011/05/infowindow_popuprenderer.jpg"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="infowindow_popuprenderer" src="http://jeffgermain.files.wordpress.com/2011/05/infowindow_popuprenderer_thumb.jpg?w=508&#038;h=300" alt="infowindow_popuprenderer" width="508" height="300" border="0" /></a></p>
<p>The application I’m developing makes heavy use of the map’s <span style="font-family:'Courier New';">InfoWindow</span> class. So, I wanted to resolve this bug with as few lines of code as possible and in one single location if possible.</p>
<p>Here’s what I did. Once the map is initialized, I add a listener to its <span style="font-family:'Courier New';">infoWindow.content</span> property. Since the <span style="font-family:'Courier New';">InfoWindow</span> only exposes the <span style="font-family:'Courier New';">close</span> event, I had to use a <span style="font-family:'Courier New';">ChangeWatcher</span> to keep an eye on the <span style="font-family:'Courier New';">content</span> property.</p>
<pre style="background-color:#fbfbfb;width:100%;"><span style="color:#008000;">// Edits to fix bug in InfoWindow/PopUpRenderer that </span></pre>
<pre style="background-color:#fbfbfb;width:100%;"><span style="color:#008000;">//does not clear out InfoWindow.label property</span></pre>
<pre style="background-color:#fbfbfb;width:100%;">ChangeWatcher.<span style="color:#0000ff;">watch</span>(map.infoWindow, "<span style="color:#8b0000;">content</span>",</pre>
<pre style="background-color:#fbfbfb;width:100%;">                     infoWindowContentChangeHandler);</pre>
<p>When the <span style="font-family:'Courier New';">content</span> property changes I check to see if the content is of type <span style="font-family:'Courier New';">PopUpRenderer</span>. Because the <span style="font-family:'Courier New';">PopUpRenderer</span> does not use the <span style="font-family:'Courier New';">InfoWindow.label</span> property, I clear it.</p>
<pre style="background-color:#fbfbfb;width:100%;"><span style="color:#0000ff;">private</span> <span style="color:#0000ff;">function</span> infoWindowContentChangeHandler(event:Event):<span style="color:#0000ff;">void</span></pre>
<pre style="background-color:#fbfbfb;width:100%;">{</pre>
<pre style="background-color:#fbfbfb;width:100%;">  <span style="color:#0000ff;">if</span>(map.infoWindow.content is PopUpRenderer)</pre>
<pre style="background-color:#fbfbfb;width:100%;">  {</pre>
<pre style="background-color:#fbfbfb;width:100%;">    map.infoWindow.label = "";</pre>
<pre style="background-color:#fbfbfb;width:100%;">  }</pre>
<pre style="background-color:#fbfbfb;width:100%;">}</pre>
<p>Fixed. Though now we have the added hassle of remembering to tote this along to future projects until Esri addresses it.</p>
<h2><span style="color:#ff0000;">Update:  ArcGIS Viewer API for Flex 2.3.1 and 2.4 </span></h2>
<p>Insert code into the MapManager.mxml file</p>
<h3>2.4 -</h3>
<p>At 2.4, insert code into the existing method <em>this_creationCompleteHandler</em> and add additional handler as follows:</p>
<p>private function this_creationCompleteHandler():void<br />
{<br />
<em>existing esri code&#8230;</em><br />
<em> &#8230;</em><br />
<em> &#8230; then</em></p>
<p>// Edits to fix bug in InfoWindow/PopUpRenderer that<br />
// does not clear out InfoWindow.label property<br />
// This is more of a defensive move!<br />
ChangeWatcher.watch(map.infoWindow, &#8220;content&#8221;, infoWindowContentChangeHandler);<br />
}</p>
<p>private function infoWindowContentChangeHandler(event:Event):void<br />
{<br />
map.infoWindow.label = &#8220;&#8221;;<br />
}</p>
<h3>2.3.1 -</h3>
<p>At 2.3.1, insert code into the existing method <em>init</em> and add additional handler as follows:</p>
<p>private function init():void<br />
{<br />
existing esri code&#8230;<br />
&#8230;<br />
&#8230; then</p>
<p>// Edits to fix bug in InfoWindow/PopUpRenderer that<br />
// does not clear out InfoWindow.label property<br />
// This is more of a defensive move!<br />
ChangeWatcher.watch(map.infoWindow, &#8220;content&#8221;, infoWindowContentChangeHandler);<br />
}</p>
<p>private function infoWindowContentChangeHandler(event:Event):void<br />
{<br />
map.infoWindow.label = &#8220;&#8221;;<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffgermain.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffgermain.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffgermain.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffgermain.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=107&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2011/05/05/bug-in-arcgis-api-for-flex-infowindow-workaround/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>

		<media:content url="http://jeffgermain.files.wordpress.com/2011/05/infowindow_tweet_thumb.jpg" medium="image">
			<media:title type="html">infowindow_tweet</media:title>
		</media:content>

		<media:content url="http://jeffgermain.files.wordpress.com/2011/05/infowindow_popuprenderer_thumb.jpg" medium="image">
			<media:title type="html">infowindow_popuprenderer</media:title>
		</media:content>
	</item>
		<item>
		<title>Consuming Esri&#8217;s new Landsat ImageServices in Flex</title>
		<link>http://jeffgermain.wordpress.com/2011/05/03/consuming-esris-new-landsat-imageservices-in-flex-2/</link>
		<comments>http://jeffgermain.wordpress.com/2011/05/03/consuming-esris-new-landsat-imageservices-in-flex-2/#comments</comments>
		<pubDate>Tue, 03 May 2011 15:42:00 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[ArcGIS Server]]></category>
		<category><![CDATA[changematters]]></category>
		<category><![CDATA[ESRI Flex API]]></category>
		<category><![CDATA[landsat]]></category>
		<category><![CDATA[ChangeMatters]]></category>

		<guid isPermaLink="false">https://jeffgermain.wordpress.com/2011/05/04/consuming-esris-new-landsat-imageservices-in-flex-2/</guid>
		<description><![CDATA[Esri’s recent release of world-wide Landsat data via image services is pretty sweet. Sweeter yet are the apps built around those services to compare and explore them. To get the most out of those services you’ll want to take advantage of the MosaicRule property on the ArcGISImageServiceLayer. The mosaic rule allows you to control which [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=95&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Esri’s <a href="http://www.esri.com/news/arcnews/spring11articles/esri-introduces-landsat-data-for-the-world.html" target="_blank">recent release of world-wide Landsat data</a> via <a href="http://imagery.arcgisonline.com/ArcGIS/rest/services/LandsatGLS" target="_blank">image services</a> is pretty sweet. Sweeter yet are the <a href="http://www.esri.com/landsat-imagery/index.html" target="_blank">apps</a> built around those services to <a href="http://changematters.esri.com/compare" target="_blank">compare</a> and <a href="http://changematters.esri.com/explore" target="_blank">explore</a> them. To get the most out of those services you’ll want to take advantage of the <a href="http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/supportClasses/MosaicRule.html" target="_blank">MosaicRule</a> property on the <a href="http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/ArcGISImageServiceLayer.html" target="_blank">ArcGISImageServiceLayer</a>. The mosaic rule allows you to control which rasters should be rendered, their ordering, and how overlapping pixels are resolved between rasters.</p>
<p>Here’s an example pulling in their Healthy Vegetation dataset. First, we’ll spin up the layer.</p>
<pre style="border-bottom:#cecece 1px solid;border-left:#cecece 1px solid;background-color:#fbfbfb;min-height:40px;width:500px;height:95px;overflow:auto;border-top:#cecece 1px solid;border-right:#cecece 1px solid;padding:5px;">
<pre style="background-color:#fbfbfb;width:100%;font-family:consolas,&#039;font-size:12px;margin:0;"><span style="color:#0000ff;">var</span> url:<span style="color:#0000ff;">String</span> =
</pre>
<pre style="background-color:#fbfbfb;width:100%;font-family:consolas,&#039;font-size:12px;margin:0;">  &quot;<span style="color:#8b0000;">http://imagery.arcgisonline.com/arcgis/rest/services/LandsatGLS/HealthyVegetation/ImageServer</span>&quot;;
</pre>
<pre style="background-color:#fbfbfb;width:100%;font-family:consolas,&#039;font-size:12px;margin:0;"><span style="color:#0000ff;">var</span> imageLayer:ArcGISImageServiceLayer = <span style="color:#0000ff;">new</span> ArcGISImageServiceLayer(url);
</pre>
<pre style="background-color:#fbfbfb;width:100%;font-family:consolas,&#039;font-size:12px;margin:0;">imageLayer.id = &quot;<span style="color:#8b0000;">HealthyVegetation</span>&quot;;</pre>
</pre>
<p>Next, we’ll apply the mosaic rule.</p>
<p><strong><font color="#ff0000">UPDATE:</font></strong>&#160; <em>The latest version of the ArcGIS API for Flex 2.3.1 fixes issues with the MosaicRule. Previously, properties not set were sent along to the REST API as “null” values which are not currently supported. Now, null properties are no longer sent to the REST API.</em></p>
<pre style="border-bottom:#cecece 1px solid;border-left:#cecece 1px solid;background-color:#fbfbfb;min-height:40px;width:500px;overflow:auto;border-top:#cecece 1px solid;border-right:#cecece 1px solid;padding:5px;">
<pre style="background-color:#fbfbfb;width:100%;font-family:consolas,&#039;font-size:12px;margin:0;"><span style="color:#0000ff;">var</span> rule:MosaicRule = <span style="color:#0000ff;">new</span> MosaicRule();
</pre>
<pre style="background-color:#fbfbfb;width:100%;font-family:consolas,&#039;font-size:12px;margin:0;">rule.method = MosaicRule.METHOD_ATTRIBUTE;
</pre>
<pre style="background-color:#fbfbfb;width:100%;font-family:consolas,&#039;font-size:12px;margin:0;">rule.sortField = &quot;<span style="color:#8b0000;">AcquisitionDate</span>&quot;;
</pre>
<pre style="background-color:#fbfbfb;width:100%;font-family:consolas,&#039;font-size:12px;margin:0;">rule.sortValue = &quot;<span style="color:#8b0000;">3000/01/01</span>&quot;;
</pre>
<pre style="background-color:#fbfbfb;width:100%;font-family:consolas,&#039;font-size:12px;margin:0;">rule.ascending = <span style="color:#0000ff;">true</span>;
</pre>
<pre style="background-color:#fbfbfb;width:100%;font-family:consolas,&#039;font-size:12px;margin:0;">rule.operation = MosaicRule.OPERATION_FIRST;
</pre>
<pre style="background-color:#fbfbfb;width:100%;font-family:consolas,&#039;font-size:12px;margin:0;">rule.where = &quot;<span style="color:#8b0000;"></span>&quot;; <span style="color:#008000;">// if left empty; i.e. null, REST API fails @ 10 SP1</span>
</pre>
<pre style="background-color:#fbfbfb;width:100%;font-family:consolas,&#039;font-size:12px;margin:0;"></pre>
<pre style="background-color:#fbfbfb;width:100%;font-family:consolas,&#039;font-size:12px;margin:0;">imageLayer.mosaicRule = rule;</pre>
</pre>
<p>With this rule, we’re specifying that the most recent imagery be displayed on top. Now, these services are “time aware” and their catalogs contain imagery from 1975, 1990, 2000 and 2005 (known as epochs). So, using the code above will render imagery for the 2005 epoch on the map.</p>
<p>But what if we wanted to see healthy vegetation for 1990? Perhaps flip back and forth between the two epochs to compare change over time? Simple. Just tell the layer to respect the time extent on the map as follows.</p>
<pre style="border-bottom:#cecece 1px solid;border-left:#cecece 1px solid;background-color:#fbfbfb;min-height:40px;width:500px;height:40px;overflow:auto;border-top:#cecece 1px solid;border-right:#cecece 1px solid;padding:5px;">
<pre style="background-color:#fbfbfb;width:100%;font-family:consolas,&#039;font-size:12px;margin:0;">imagerLayer.useMapTime = <span style="color:#0000ff;">true</span>;</pre>
</pre>
<p>Then set the <a href="http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/Map.html#timeExtent" target="_blank">timeExtent</a> on the map manually or via the <a href="http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/components/TimeSlider.html" target="_blank">TimeSlider</a> component.</p>
<p>Anyways, head over to their <a href="http://www.esri.com/landsat-imagery/index.html" target="_blank">Landsat page</a> and see their apps and services.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffgermain.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffgermain.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffgermain.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffgermain.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=95&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2011/05/03/consuming-esris-new-landsat-imageservices-in-flex-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>
	</item>
		<item>
		<title>Multiple log files with log4net in ArcGIS</title>
		<link>http://jeffgermain.wordpress.com/2010/04/23/multiple-log-files-with-log4net-in-arcgis/</link>
		<comments>http://jeffgermain.wordpress.com/2010/04/23/multiple-log-files-with-log4net-in-arcgis/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 00:18:54 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[ArcMap]]></category>
		<category><![CDATA[log4net]]></category>
		<category><![CDATA[FileAppender]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2010/04/23/multiple-log-files-with-log4net-in-arcgis/</guid>
		<description><![CDATA[If you are not currently storing your application exceptions somewhere, perhaps you should reconsider. Not only does it help you the developer debug deployment issues but it also helps the client monitor the health of your software over time. Change is inevitable; eventually database connection strings change, servers change, etc. Log4net is the de facto [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=78&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are not currently storing your application exceptions somewhere, perhaps you should reconsider. Not only does it help you the developer debug deployment issues but it also helps the client monitor the health of your software over time. Change is inevitable; eventually database connection strings change, servers change, etc.</p>
<p><a title="log4net" href="http://logging.apache.org/log4net/" target="_blank">Log4net</a> is the de facto .NET logging engine. While using a single logger in your application is straightforward, managing multiple loggers is less so. Here’s an example of how to maintain two log files in one application; one log for exceptions and the other for runtime events that may be presented to the user. It is actually based on a real set of requirements I had from a client as outlined below. </p>
<p>To skip the real-world implementation overview, scroll down to the <strong>Sample Source Code section</strong>.</p>
<h4>Requirements</h4>
<ul>
<li>Built for ArcMap 9.3.1 </li>
<li>Tools to load data from a personal geodatabase or file geodatabase to an ArcSDE enterprise geodatabase </li>
<li>Ability to map fields from source featureclasses to target SDE featureclasses </li>
<li>Ability to choose source featureclasses from layers in the map </li>
<li>Load results must be presented to the user as well as the details stored in a log file </li>
<li>etc… </li>
</ul>
<h4>Solution</h4>
<p>Build an ArcMap toolbar with commands and an extension to manage it all. Use <a title="log4net" href="http://logging.apache.org/log4net/" target="_blank">Log4net</a> to log exceptions and load events to separate log files.</p>
<p>I won’t rehash how to set up log4net for use with ArcMap. Check out <a title="Using Log4Net in ArcMap COM Extensions/Commands etc" href="http://blog.davebouwman.com/index.php/2009/10/using-log4net-in-arcmap-com-extensionscommands-etc/" target="_blank">Dave’s post</a> for a good tutorial.</p>
<h6>Featureclass Field Mappings</h6>
<p>Field mappings per feature class were configured in an application configuration file. If a mapped field was not found to exist in either source or target feature class, then the load operation for that class was skipped and the reason logged to a load events file.</p>
<h6>Load Events Log Example</h6>
<p>Any issues raised during the feature load was logged to the SpatialDataLoaderLog. Log included the ObjectID for the source feature so analysts could better troubleshoot those issues. </p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:&#39;direction:ltr;height:70px;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100.19%;font-family:&#39;direction:ltr;height:1px;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;">2010-02-04 16:10:08,747 [1] [SpatialDataLoaderLog] - ERROR - Project_Line OID 5 failed to load. U09BL0211 - No matching STATE_PROJECT_NUMBER found <span style="color:#0000ff;">in</span> database.2010-02-04 16:10:08,933 [1] [SpatialDataLoaderLog] - ERROR - Project_Polygon OID 38 failed to load. Linestring or poly boundary <span style="color:#0000ff;">is</span> self-intersecting2010-02-04 16:10:08,942 [1] [SpatialDataLoaderLog] - ERROR - Project_Polygon OID 39 failed to load. U09UT0548 - No matching STATE_PROJECT_NUMBER found <span style="color:#0000ff;">in</span> database.</pre>
<p></div>
<h6>Error Log Example</h6>
<p>Exceptions were logged to the error EventLog. This would include SDE connection issues, etc.</p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:&#39;direction:ltr;height:47px;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100.19%;font-family:&#39;direction:ltr;height:13px;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;">2010-02-20 13:42:29,492 [1] ERROR EventLog [(null)] - System.Runtime.InteropServices.COMException: Underlying DBMS error[Microsoft SQL Server Native Client 10.0: Login timeout expiredNo extended error.]</pre>
<p></div>
<h5>&#160;</h5>
<h5>Sample Source Code</h5>
<p>I’ve created a sample project containing an ArcMap extension, toolbar, command, and UI. It demonstrates the log4net configuration to support multiple <a href="http://logging.apache.org/log4net/release/sdk/log4net.Appender.FileAppender.html" target="_blank">FileAppenders</a>, contains a basic logging helper library that wraps the log4net logger, and includes an extension that manages and exposes the loggers.</p>
<p>Download source code <a title="Download sample source code" href="http://www.box.net/shared/00kd6pvmrd" target="_blank">here</a>.</p>
<p>Open the source projects using VS2008+ and update the ArcGIS 9.3.1 libraries to whatever version you’re running. </p>
<p>Build the solution.</p>
<p>Access the Log4Net Sample Extension toolbar</p>
<p><a href="http://jeffgermain.files.wordpress.com/2010/04/sample_toolbar.png" target="_blank"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="sample_toolbar" border="0" alt="sample_toolbar" src="http://jeffgermain.files.wordpress.com/2010/04/sample_toolbar_thumb.png?w=240&#038;h=231" width="240" height="231" /></a> </p>
<p>The Log4Net Sample command and UI</p>
<p><a href="http://jeffgermain.files.wordpress.com/2010/04/sample_command_ui.png" target="_blank"><img style="display:inline;border-width:0;" title="sample_command_ui" border="0" alt="sample_command_ui" src="http://jeffgermain.files.wordpress.com/2010/04/sample_command_ui_thumb.png?w=240&#038;h=212" width="240" height="212" /></a>&#160;</p>
<p>The log4net configuration uses <a href="http://logging.apache.org/log4net/release/sdk/log4net.Appender.FileAppender.html" target="_blank">FileAppenders</a> but could easily be modified to use any of the supported <a title="log4net config examples" href="http://logging.apache.org/log4net/release/config-examples.html" target="_blank">Appenders</a>.</p>
<p>Enjoy logging with log4net!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffgermain.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffgermain.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffgermain.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffgermain.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=78&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2010/04/23/multiple-log-files-with-log4net-in-arcgis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>

		<media:content url="http://jeffgermain.files.wordpress.com/2010/04/sample_toolbar_thumb.png" medium="image">
			<media:title type="html">sample_toolbar</media:title>
		</media:content>

		<media:content url="http://jeffgermain.files.wordpress.com/2010/04/sample_command_ui_thumb.png" medium="image">
			<media:title type="html">sample_command_ui</media:title>
		</media:content>
	</item>
		<item>
		<title>Default draw symbology in the ESRI Flex Starter Kit</title>
		<link>http://jeffgermain.wordpress.com/2010/01/20/default-draw-symbology-in-the-esri-flex-starter-kit/</link>
		<comments>http://jeffgermain.wordpress.com/2010/01/20/default-draw-symbology-in-the-esri-flex-starter-kit/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 17:31:58 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[ArcGIS Server]]></category>
		<category><![CDATA[ESRI Flex API]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2010/01/20/default-draw-symbology-in-the-esri-flex-starter-kit/</guid>
		<description><![CDATA[If you have used ESRI’s Flex Starter Kit you may have noticed an annoying feature when sketching graphics on the map via your custom widgets or their DrawWidget. When sketching a polygon, it requires 2 vertices before the sketch is drawn on the map. This only confuses your users as they are not sure their [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=68&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you have used <a href="http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&amp;scriptID=15905" target="_blank">ESRI’s Flex Starter Kit</a> you may have noticed an annoying feature when sketching graphics on the map via your custom widgets or their DrawWidget. When sketching a polygon, it requires 2 vertices before the sketch is drawn on the map. This only confuses your users as they are not sure their sketch has begun.</p>
<p>Anyways, it’s a simple fix… 2 lines of code. In MapManager::config() method, the <a href="http://resources.esri.com/help/9.3/arcgisserver/apis/flex/apiref/com/esri/ags/toolbars/Draw.html" target="_blank">Draw</a> object is instantiated. Insert code to set default <a href="http://resources.esri.com/help/9.3/arcgisserver/apis/flex/apiref/com/esri/ags/toolbars/Draw.html#fillSymbol" target="_blank">fillSymbol</a>, <a href="http://resources.esri.com/help/9.3/arcgisserver/apis/flex/apiref/com/esri/ags/toolbars/Draw.html#lineSymbol" target="_blank">lineSymbol</a>, and <a href="http://resources.esri.com/help/9.3/arcgisserver/apis/flex/apiref/com/esri/ags/toolbars/Draw.html#markerSymbol" target="_blank">markerSymbol</a>. Here’s how:</p>
<div id="codeSnippetWrapper" style="border-right:silver 1px solid;border-top:silver 1px solid;font-size:8pt;overflow:auto;border-left:silver 1px solid;width:97.5%;cursor:text;direction:ltr;max-height:200px;line-height:12pt;border-bottom:silver 1px solid;font-family:&#39;background-color:#f4f4f4;text-align:left;margin:20px 0 10px;padding:4px;">
<div id="codeSnippet" style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;padding:0;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;">drawToolbar = <span style="color:#0000ff;">new</span> Draw();</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;">drawToolbar.map = map;            </pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;">drawToolbar.addEventListener(DrawEvent.DRAW_END, onDrawEnd);</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span style="color:#008000;">// DTSAgile: Add default symbols so polygons are visible from first click when drawing</span></pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;">drawToolbar.lineSymbol = <span style="color:#0000ff;">new</span> SimpleLineSymbol(<span style="color:#006080;">&quot;solid&quot;</span>,0x333333, .8, 1);                    </pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;">drawToolbar.fillSymbol = <span style="color:#0000ff;">new</span> SimpleFillSymbol(<span style="color:#006080;">&quot;solid&quot;</span>, 0x333333, 0.15, <span style="color:#0000ff;">new</span> SimpleLineSymbol(<span style="color:#006080;">&quot;solid&quot;</span>,0x333333, .8, 1));                        </pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;"><span style="color:#008000;">// drawToolbar.markerSymbol - add here...</span></pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span style="color:#008000;">// End DTSAgile edits</span></pre>
<p><!--CRLF--></div>
</div>
<p>Note: This certainly isn’t limited to the ESRI Flex Starter Kit. This will occur anytime you try to draw a polygon using the Draw object and default symbols have not been set. </p>
<p>The likely culprit in all this is <a href="http://resources.esri.com/help/9.3/arcgisserver/apis/flex/apiref/index.html" target="_blank">ESRI’s Flex API</a> for <a href="http://resources.esri.com/help/9.3/arcgisserver/apis/flex/apiref/com/esri/ags/toolbars/Draw.html" target="_blank">Draw</a>(). It does not seem to set the outline symbol for the <a href="http://resources.esri.com/help/9.3/arcgisserver/apis/flex/apiref/com/esri/ags/toolbars/Draw.html#fillSymbol" target="_blank">fillSymbol</a>. Thus, there is no area to fill until 2 vertices have been added to your sketch, and no outline symbol to show you where you started your sketch!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffgermain.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffgermain.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffgermain.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffgermain.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=68&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2010/01/20/default-draw-symbology-in-the-esri-flex-starter-kit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>
	</item>
		<item>
		<title>Validating PDF Documents</title>
		<link>http://jeffgermain.wordpress.com/2009/12/22/validating-pdf-documents/</link>
		<comments>http://jeffgermain.wordpress.com/2009/12/22/validating-pdf-documents/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 23:12:40 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ArcGIS Server]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[iTextSharp]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[PDF]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2009/12/22/validating-pdf-documents/</guid>
		<description><![CDATA[So I’m just wrapping up a project where I had to generate PDF reports involving ArcGIS Server, ASP.NET MVC, and web services. I’ll do a post on how I rolled it all together later. But first, let’s look at this nugget… how to validate the PDFs being generated. The PDF library I used was iTextSharp, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=65&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I’m just wrapping up a project where I had to generate PDF reports involving ArcGIS Server, ASP.NET MVC, and web services. I’ll do a post on how I rolled it all together later. But first, let’s look at this nugget… how to validate the PDFs being generated.</p>
<p>The PDF library I used was <a href="http://itextsharp.sourceforge.net/" target="_blank">iTextSharp</a>, which was great. I would suggest getting the book “iText In Action” if you’re short on time (<a href="http://itextpdf.com/book/index.php" target="_blank">here</a> or at <a href="http://www.amazon.com/iText-Action-Creating-Manipulating-PDF/dp/1932394796" target="_blank">Amazon</a>). Otherwise, you’ll be doing more trial and error than necessary. Another valuable resource is the outdated <a href="http://itextsharp.sourceforge.net/tutorial/index.html" target="_blank">tutorials</a>.</p>
<p>So, everything is working great on my dev box and on my server. However, my client was reporting this issue when attempting to open the report&#8230; they&#8217;re using Adobe Acrobat 8.1.6, while I&#8217;m using 9.0</p>
<blockquote><p>“An Error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem.”</p></blockquote>
<p>Ouch! That doesn&#8217;t look good.</p>
<p>I wasn’t able to reproduce the issue using Adobe Reader or Foxit Reader. So I researched how to validate the PDF. iTextSharp doesn’t offer any way to do this, but the FREE trial version of Adobe Acrobat (9) does. It offers the program <a href="http://help.adobe.com/en_US/Acrobat/9.0/Professional/WS58a04a822e3e50102bd615109794195ff-7b82.w.html" target="_blank">Preflight</a> which can analyze your PDF in all sorts of ways. So I had my client send me a PDF they generated using our application which I analyzed using Preflight, specifically <strong>Report PDF syntax issues</strong>.</p>
<p><a href="http://jeffgermain.files.wordpress.com/2009/12/preflight.png" target="_blank"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="Preflight" src="http://jeffgermain.files.wordpress.com/2009/12/preflight_thumb.png?w=244&#038;h=184" border="0" alt="Preflight" width="244" height="184" /></a> Run this gem, then save the results to a PDF. I sent those results to my client. Turns out it was their installation of Adobe Acrobat. Doh!</p>
<p><a href="http://jeffgermain.files.wordpress.com/2009/12/preflight_report.png" target="_blank"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border:0;" title="Preflight_Report" src="http://jeffgermain.files.wordpress.com/2009/12/preflight_report_thumb.png?w=234&#038;h=244" border="0" alt="Preflight_Report" width="234" height="244" /></a></p>
<p>Anyways, a great tool and handy when generating PDFs using a low-level library like iTextSharp.</p>
<p>I had to download the <a title="Trial version of Adobe Acrobat Pro" href="http://www.adobe.com/products/acrobatpro/tryout.html" target="_blank">Trial version of Adobe Acrobat 9</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffgermain.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffgermain.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffgermain.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffgermain.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=65&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2009/12/22/validating-pdf-documents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>

		<media:content url="http://jeffgermain.files.wordpress.com/2009/12/preflight_thumb.png" medium="image">
			<media:title type="html">Preflight</media:title>
		</media:content>

		<media:content url="http://jeffgermain.files.wordpress.com/2009/12/preflight_report_thumb.png" medium="image">
			<media:title type="html">Preflight_Report</media:title>
		</media:content>
	</item>
		<item>
		<title>Debugging Server Object Extensions</title>
		<link>http://jeffgermain.wordpress.com/2009/12/16/debugging-server-object-extensions/</link>
		<comments>http://jeffgermain.wordpress.com/2009/12/16/debugging-server-object-extensions/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 17:59:27 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[ArcGIS Server]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Server Object Extensions]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2009/12/16/debugging-server-object-extensions/</guid>
		<description><![CDATA[Not sure how I missed this one, but Dave just turned me onto it. Simon, over at Map Butcher, did a great post a while back on how to debug server object extensions in Visual Studio. Check it out here and say good-bye to “debugging” using log files. So, to roll with this using the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=56&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Not sure how I missed this one, but <a href="http://blog.davebouwman.com/" target="_blank">Dave</a> just turned me onto it. Simon, over at <a href="http://mapbutcher.com/blog/" target="_blank">Map Butcher</a>, did a great post a while back on how to debug server object extensions in Visual Studio. Check it out <a href="http://mapbutcher.com/blog/?p=52" target="_blank">here</a> and say good-bye to “debugging” using log files.</p>
<p>So, to roll with this using the <a href="http://jeffgermain.wordpress.com/2009/12/12/post-build-event-for-custom-server-object-extensions/" target="_blank">post-build event configuration in my previous post</a>, you’ll need to copy over the your SOE’s debug file (.pdb). Do it manually from the bin\debug folder, or add it to the post-build event as follows:</p>
<div id="codeSnippetWrapper" style="border-right:silver 1px solid;border-top:silver 1px solid;font-size:8pt;overflow:auto;border-left:silver 1px solid;width:97.5%;cursor:text;direction:ltr;max-height:200px;line-height:12pt;border-bottom:silver 1px solid;font-family:&#39;background-color:#f4f4f4;text-align:left;margin:20px 0 10px;padding:4px;">
<div id="codeSnippet" style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;padding:0;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum1" style="color:#606060;">   1:</span> IF EXIST $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.dll (</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum2" style="color:#606060;">   2:</span>     $(SolutionDir)_install_ComUtilities\regasm /unregister $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.dll</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum3" style="color:#606060;">   3:</span> )</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum4" style="color:#606060;">   4:</span> IF EXIST $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.dll (</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum5" style="color:#606060;">   5:</span>     $(SolutionDir)_install_ComUtilities\regasm /unregister $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.dll</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum6" style="color:#606060;">   6:</span> )</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum7" style="color:#606060;">   7:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum8" style="color:#606060;">   8:</span> SC STOP ArcServerObjectManager</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum9" style="color:#606060;">   9:</span> ping -n 5 localhost &gt; NUL</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum10" style="color:#606060;">  10:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum11" style="color:#606060;">  11:</span> DEL $(SolutionDir)_install_ComUtilities\*.dll</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum12" style="color:#606060;">  12:</span> DEL $(SolutionDir)_install_ComUtilities\*.tlb</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum13" style="color:#606060;">  13:</span> DEL $(SolutionDir)_install_ComUtilities\*.pdb</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum14" style="color:#606060;">  14:</span> DEL $(SolutionDir)_install_ComUtilities\Logs\*.txt</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum15" style="color:#606060;">  15:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum16" style="color:#606060;">  16:</span> COPY $(TargetDir)*.dll $(SolutionDir)_install_ComUtilities\*.dll</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum17" style="color:#606060;">  17:</span> IF $(ConfigurationName)==Debug (</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum18" style="color:#606060;">  18:</span>     COPY $(TargetDir)$(TargetName).pdb $(SolutionDir)_install_ComUtilities\$(TargetName).pdb</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum19" style="color:#606060;">  19:</span> )</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum20" style="color:#606060;">  20:</span> ping -n 2 localhost &gt; NUL</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum21" style="color:#606060;">  21:</span> $(SolutionDir)_install_ComUtilities\regasm $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.dll /tlb:$(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.tlb /codebase</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum22" style="color:#606060;">  22:</span> $(SolutionDir)_install_ComUtilities\regasm $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.dll /tlb:$(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.tlb /codebase</pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:white;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum23" style="color:#606060;">  23:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;direction:ltr;line-height:12pt;font-family:&#39;background-color:#f4f4f4;text-align:left;border-style:none;margin:0;padding:0;"><span id="lnum24" style="color:#606060;">  24:</span> SC START ArcServerObjectManager</pre>
<p><!--CRLF--></div>
</div>
<p><strong>What’s new?</strong> </p>
<p><u>Line 1 &amp; 4</u>:&#160; To avoid errors I’ve added a check to unregister DLLs only if they exist. </p>
<p><u>Line 13</u>:&#160; Delete any debug files from output directory.</p>
<p><u>Line 17</u>:&#160; If SOE’s build is configured for “Debug”, then copy only the SOE’s debug file to the output directory.</p>
<p>That’s it. Now you’re ready to debug your SOE. </p>
<p>Happy debugging!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffgermain.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffgermain.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffgermain.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffgermain.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=56&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2009/12/16/debugging-server-object-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>
	</item>
		<item>
		<title>Post-build Event for Custom Server Object Extensions</title>
		<link>http://jeffgermain.wordpress.com/2009/12/12/post-build-event-for-custom-server-object-extensions/</link>
		<comments>http://jeffgermain.wordpress.com/2009/12/12/post-build-event-for-custom-server-object-extensions/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 19:36:48 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[ArcGIS Server]]></category>
		<category><![CDATA[Server Object Extensions]]></category>
		<category><![CDATA[Debugging]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2009/12/12/post-build-event-for-custom-server-object-extensions/</guid>
		<description><![CDATA[While developing ArcGIS Server Object Extensions, I typically run a post-build event in the SOE Visual Studio project to copy the DLL and it dependencies to an output folder outside of the actual Visual Studio project. It is there that I perform the COM registration using REGASM. Until today I have relied on BAT files [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=49&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While developing ArcGIS Server Object Extensions, I typically run a post-build event in the SOE Visual Studio project to copy the DLL and it dependencies to an output folder outside of the actual Visual Studio project. It is there that I perform the COM registration using REGASM. Until today I have relied on BAT files to do the work for me; uninstall and install. Vish has provided a great VS template for building SOEs you can get <a href="http://viswaug.wordpress.com/2009/03/29/template-for-creating-server-object-extensions/" target="_blank">here</a> and provided a nice talk at the ESRI dev summit.</p>
<p>To streamline the process, I have created a post-build event to take care of all the work for me. Here’s the script.</p>
<div id="codeSnippetWrapper" style="border:1px solid silver;overflow:auto;font-size:8pt;width:97.5%;cursor:text;direction:ltr;max-height:200px;line-height:12pt;">
<div id="codeSnippet" style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;">
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum1" style="color:#606060;">   1:</span> $(SolutionDir)_install_ComUtilities\regasm /unregister $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.dll</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum2" style="color:#606060;">   2:</span> $(SolutionDir)_install_ComUtilities\regasm /unregister $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.dll</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum3" style="color:#606060;">   3:</span></pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum4" style="color:#606060;">   4:</span> SC STOP ArcServerObjectManager</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum5" style="color:#606060;">   5:</span> ping -n 5 localhost &gt; NUL</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum6" style="color:#606060;">   6:</span></pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum7" style="color:#606060;">   7:</span> DEL $(SolutionDir)_install_ComUtilities\*.dll</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum8" style="color:#606060;">   8:</span> DEL $(SolutionDir)_install_ComUtilities\*.tlb</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum9" style="color:#606060;">   9:</span> DEL $(SolutionDir)_install_ComUtilities\Logs\*.txt</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum10" style="color:#606060;">  10:</span></pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum11" style="color:#606060;">  11:</span> COPY $(TargetDir)*.dll $(SolutionDir)_install_ComUtilities\*.dll</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum12" style="color:#606060;">  12:</span></pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum13" style="color:#606060;">  13:</span> $(SolutionDir)_install_ComUtilities\regasm $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.dll /tlb:$(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.tlb /codebase</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum14" style="color:#606060;">  14:</span> $(SolutionDir)_install_ComUtilities\regasm $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.dll /tlb:$(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.tlb /codebase</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum15" style="color:#606060;">  15:</span></pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum16" style="color:#606060;">  16:</span> SC START ArcServerObjectManager</pre>
<p><!--CRLF--></p>
</div>
</div>
<p>What’s going on?</p>
<p>* Unregister existing .NET assemblies with COM</p>
<div id="codeSnippetWrapper" style="border:1px solid silver;overflow:auto;font-size:8pt;width:97.5%;cursor:text;direction:ltr;max-height:200px;line-height:12pt;">
<div id="codeSnippet" style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;">
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum1" style="color:#606060;">   1:</span> $(SolutionDir)_install_ComUtilities\regasm /unregister $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.dll</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum2" style="color:#606060;">   2:</span> $(SolutionDir)_install_ComUtilities\regasm /unregister $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.dll</pre>
<p><!--CRLF--></p>
</div>
</div>
<p>* Stop the ArcGIS Server Object Manager process and wait 5 seconds while it shuts down. Stopping the SOM kills all SOC processes that have locks on our SOE DLL.</p>
<div id="codeSnippetWrapper" style="border:1px solid silver;overflow:auto;font-size:8pt;width:97.5%;cursor:text;direction:ltr;max-height:200px;line-height:12pt;">
<div id="codeSnippet" style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;">
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum1" style="color:#606060;">   1:</span> SC STOP ArcServerObjectManager</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum2" style="color:#606060;">   2:</span> ping -n 5 localhost &gt; NUL</pre>
<p><!--CRLF--></p>
</div>
</div>
<p>* Delete DLL, TLB, and custom log files</p>
<div id="codeSnippetWrapper" style="border:1px solid silver;overflow:auto;font-size:8pt;width:97.5%;cursor:text;direction:ltr;max-height:200px;line-height:12pt;">
<div id="codeSnippet" style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;">
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum1" style="color:#606060;">   1:</span> DEL $(SolutionDir)_install_ComUtilities\*.dll</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum2" style="color:#606060;">   2:</span> DEL $(SolutionDir)_install_ComUtilities\*.tlb</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum3" style="color:#606060;">   3:</span> DEL $(SolutionDir)_install_ComUtilities\Logs\*.txt</pre>
<p><!--CRLF--></p>
</div>
</div>
<p>* Copy fresh DLLs to this directory</p>
<div id="codeSnippetWrapper" style="border:1px solid silver;overflow:auto;font-size:8pt;width:97.5%;cursor:text;direction:ltr;max-height:200px;line-height:12pt;">
<div id="codeSnippet" style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;">
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum1" style="color:#606060;">   1:</span> COPY $(TargetDir)*.dll $(SolutionDir)_install_ComUtilities\*.dll</pre>
<p><!--CRLF--></p>
</div>
</div>
<p>* Register those .NET assemblies with COM</p>
<div id="codeSnippetWrapper" style="border:1px solid silver;overflow:auto;font-size:8pt;width:97.5%;cursor:text;direction:ltr;max-height:200px;line-height:12pt;">
<div id="codeSnippet" style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;">
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum1" style="color:#606060;">   1:</span> $(SolutionDir)_install_ComUtilities\regasm $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.dll /tlb:$(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.tlb /codebase</pre>
<p><!--CRLF--></p>
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum2" style="color:#606060;">   2:</span> $(SolutionDir)_install_ComUtilities\regasm $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.dll /tlb:$(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.tlb /codebase</pre>
<p><!--CRLF--></p>
</div>
</div>
<p>* Restart the ArcGIS Server Object Manager</p>
<div id="codeSnippetWrapper" style="border:1px solid silver;overflow:auto;font-size:8pt;width:97.5%;cursor:text;direction:ltr;max-height:200px;line-height:12pt;">
<div id="codeSnippet" style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;">
<pre style="overflow:visible;font-size:8pt;width:100%;color:black;direction:ltr;line-height:12pt;"><span id="lnum1" style="color:#606060;">   1:</span> SC START ArcServerObjectManager</pre>
<p><!--CRLF--></p>
</div>
</div>
<p>Of course, I’ll build an installer for the final delivery to the client.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffgermain.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffgermain.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffgermain.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffgermain.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=49&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2009/12/12/post-build-event-for-custom-server-object-extensions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>
	</item>
		<item>
		<title>Issues upgrading ArcGIS Server 9.3 to 9.3.1</title>
		<link>http://jeffgermain.wordpress.com/2009/09/15/issues-upgrading-arcgis-server-9-3-to-9-3-1/</link>
		<comments>http://jeffgermain.wordpress.com/2009/09/15/issues-upgrading-arcgis-server-9-3-to-9-3-1/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 17:03:25 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[ArcGIS Server]]></category>
		<category><![CDATA[9.3]]></category>
		<category><![CDATA[9.3.1]]></category>
		<category><![CDATA[install error]]></category>
		<category><![CDATA[Server Host cannot be null]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2009/09/15/issues-upgrading-arcgis-server-9-3-to-9-3-1/</guid>
		<description><![CDATA[Yesterday I ran into issues upgrading my developer box from 9.3 SP1 to 9.3.1. I’m running Windows Server 2008. No problems upgrading ArcGIS Desktop. However, after completing the post install of server I was no longer able to browse to my local services via http://localhost/arcgis/rest/services. In fact, my entire ArcGIS instance folder located under wwwroot [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=48&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yesterday I ran into issues upgrading my developer box from 9.3 SP1 to 9.3.1. I’m running Windows Server 2008. No problems upgrading ArcGIS Desktop. However, after completing the post install of server I was no longer able to browse to my local services via <a href="http://localhost/arcgis/rest/services">http://localhost/arcgis/rest/services</a>. In fact, my entire ArcGIS instance folder located under wwwroot was gone!</p>
<p>So I uninstalled ArcGIS Server completely and reinstalled ArcGIS Server 9.3. This time the instance folder was created, but inside the rest folder, the rest.config file did not contain my server information. Instead all those fields were empty, explaining the “Server Host cannot be null” error received when trying to browse to the services directory.</p>
<p><a href="http://jeffgermain.files.wordpress.com/2009/09/20090915_ags_error.png" target="_blank"><img title="20090915_AGS_Error" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="154" alt="20090915_AGS_Error" src="http://jeffgermain.files.wordpress.com/2009/09/20090915_ags_error_thumb.png?w=244&#038;h=154" width="244" border="0" /></a> </p>
<p>After burning an afternoon trying to upgrade, I did finally succeed. The silver bullet? Well, several things:</p>
<ul>
<li>Delete folder c:\arcgisserver</li>
<li>Delete all folders from C:\Program Files (x86)\ArcGIS\server\user\cfg</li>
<li>Delete all files from C:\Program Files (x86)\ArcGIS\server\user\log</li>
<li>Remove the arcsom, arcsoc, and arcwebservices users from both agsadmin and agsusers groups created during post install. DO NOT delete those groups!</li>
</ul>
<p><strong>Additional resources that may address your flavor of install issue:</strong></p>
<ul>
<li><a title="http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&amp;d=36758" href="http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&amp;d=36758">http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&amp;d=36758</a></li>
<li><a title="http://forums.esri.com/Thread.asp?c=158&amp;f=2399&amp;t=258424&amp;mc=19#msgid805911" href="http://forums.esri.com/Thread.asp?c=158&amp;f=2399&amp;t=258424&amp;mc=19#msgid805911">http://forums.esri.com/Thread.asp?c=158&amp;f=2399&amp;t=258424&amp;mc=19#msgid805911</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffgermain.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffgermain.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffgermain.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffgermain.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=48&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2009/09/15/issues-upgrading-arcgis-server-9-3-to-9-3-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>

		<media:content url="http://jeffgermain.files.wordpress.com/2009/09/20090915_ags_error_thumb.png" medium="image">
			<media:title type="html">20090915_AGS_Error</media:title>
		</media:content>
	</item>
		<item>
		<title>Developing with ArcObjects on Windows 64-bit OS</title>
		<link>http://jeffgermain.wordpress.com/2009/03/25/developing-with-arcobjects-on-windows-64-bit-os/</link>
		<comments>http://jeffgermain.wordpress.com/2009/03/25/developing-with-arcobjects-on-windows-64-bit-os/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 14:40:11 +0000</pubDate>
		<dc:creator>Jeff Germain</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[ArcGIS Server]]></category>
		<category><![CDATA[ArcObjects]]></category>

		<guid isPermaLink="false">http://jeffgermain.wordpress.com/2009/03/25/developing-with-arcobjects-on-windows-64-bit-os/</guid>
		<description><![CDATA[Just a week into running on my new development box, Windows Server 2008 64, and everything had been smooth… until this bump in the road. While writing a utility COM component to extend ArcGIS Server, I ran into a serious gotcha. The issue actually was exposed while I was writing/running unit tests. Spinning up any [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=45&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just a week into running on my new development box, Windows Server 2008 64, and everything had been smooth… until this bump in the road. While writing a utility COM component to extend ArcGIS Server, I ran into a serious gotcha. The issue actually was exposed while I was writing/running unit tests. Spinning up any ArcObjects in my tests were failing with the following runtime error:</p>
<blockquote><p><em>System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {E01BE902-CC85-4B13-A828-02E789E0DDA9} failed due to the following error: 80040154.</em></p>
</blockquote>
<p>ArcObjects for .NET uses managed COM interop assemblies to access the 32-bit COM objects (unmanaged C++ core ArcObjects libraries). So, turns out the test project’s “Platform Target” property was set to “Any CPU”. </p>
<p><strong>The Fix?</strong></p>
<p>Change the project’s “Platform Target” property from “Any CPU” (VS defaults to this) to “x86”. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jeffgermain.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jeffgermain.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jeffgermain.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jeffgermain.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jeffgermain.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jeffgermain.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jeffgermain.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jeffgermain.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jeffgermain.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jeffgermain.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jeffgermain.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jeffgermain.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jeffgermain.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jeffgermain.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jeffgermain.wordpress.com&amp;blog=721276&amp;post=45&amp;subd=jeffgermain&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jeffgermain.wordpress.com/2009/03/25/developing-with-arcobjects-on-windows-64-bit-os/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/995ca2ed3d99c6a02626ae09651a45a6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jeff</media:title>
		</media:content>
	</item>
	</channel>
</rss>
