|
POST
|
Have you tried either Dim objMxDoc As IMxDocument objMxDoc = New MxDocument or Dim objMxDoc As New MxDocument
... View more
01-24-2012
04:59 AM
|
0
|
0
|
839
|
|
POST
|
If you want to get a better idea of the order in which code functions, put in breakpoints at various points. This will show you how the program is progressing.
SearchSaleTable(PinArray); // send array to function
trace("The very last value " + nsum);
private function SearchSaleTable(tmp:ArrayCollection):Number
{[INDENT]// loops thru the pin's to search Sale table [/INDENT]
[INDENT]
cursor = tmp.createCursor();[/INDENT]
[INDENT]var t:String = new String;[/INDENT]
[INDENT]while(!cursor.afterLast)[/INDENT]
[INDENT]{ [/INDENT]
[INDENT=2]t = cursor.current.toString();[/INDENT]
[INDENT=2]var saleQueryTask:QueryTask = new QueryTask(); [/INDENT]
[INDENT=2]
saleQueryTask.url = "my url";
saleQueryTask.showBusyCursor = true;
saleQueryTask.useAMF = false;[/INDENT]
[INDENT=2]sQuery.where = "SAPROP = '" + t + "'" ;
saleQueryTask.execute(sQuery, new AsyncResponder(onResult, onFault));
function onResult(featureSet:FeatureSet, token:Object = null):Number
{[/INDENT]
[INDENT=3]nsum = 0; <-- put breakpoint here
[/INDENT]
[INDENT=3]for each (var g:Graphic in featureSet.features)[/INDENT]
[INDENT=3]{[/INDENT]
[INDENT=4]nsum += g.attributes.SAPRICE; [/INDENT]
[INDENT=3]}[/INDENT]
[INDENT=3]trace("on Result " + nsum); // both "trace" return correct values.........[/INDENT]
[INDENT=3]
sumSaleValue = sumSaleValue + nsum;[/INDENT]
[INDENT=3]trace("The very last value " + nsum);
trace("The very last value " + nsum);
trace("on sumSale " + sumSaleValue);
[/INDENT]
[INDENT=3]return nsum;[/INDENT]
[INDENT=2]}
[/INDENT]
[INDENT=2]function onFault(info:Object, token:Object = null):void
{[/INDENT]
[INDENT=3]Alert.show(info.toString());[/INDENT]
[INDENT=2]}
cursor.moveNext() [/INDENT]
[INDENT]} [/INDENT]
[INDENT]return sumSaleValue; or return nsum <-- put breakpoint here
[/INDENT]
}
You see that the breakpoint on the return is hit before the breakpoint in the function.
... View more
01-23-2012
08:17 AM
|
0
|
0
|
1262
|
|
POST
|
The code is running correctly. After the program executes the querytask, it will continue through the rest of the function without waiting for the querytask results to be returned. That will happen only in your "test" function when the listener determines the execution is completed. If you want to do things with "nsum", you'll have to put that code into your "test" function. Take a look in the Query Task samples, like this, as an example.
... View more
01-20-2012
01:06 PM
|
0
|
0
|
1262
|
|
POST
|
In some of the .Net applications I build, I use the line System.Windows.Forms.Cursor.Current = Windows.Forms.Cursors.WaitCursor at the beginning of a long operation and at the end of the operation, setting it to the default with the line System.Windows.Forms.Cursor.Current = Windows.Forms.Cursors.Default
... View more
01-18-2012
05:25 AM
|
0
|
0
|
2242
|
|
POST
|
You can use Split to separate out the parts of the address. The syntax would be something like this: addresses = Split([field], " - ") address = addresses(0) direction = addresses(1)
... View more
12-30-2011
05:59 AM
|
0
|
0
|
5810
|
|
POST
|
To show the code, click on the # symbol in the strip above the editor.
//==== THIS IS HOW I ACCESS REPEATER INFORMATION ON A CLICK EVENT
private function btnShowCharacterize(evt:Event):void
{
Alert.show ("current name - " + evt.currentTarget.getRepeaterItem().wsName);
Alert.show ("current index - " + evt.currentTarget.repeaterIndices + " open/close - " + openCloseArray[index].toString());
}
... View more
12-21-2011
06:12 AM
|
0
|
0
|
586
|
|
POST
|
Could it be related to this issue? What happens when you use the RollOver event instead of the MouseOver event?
... View more
12-06-2011
06:23 AM
|
0
|
0
|
1359
|
|
POST
|
Take a look at this thread in the old forums about linking data frames
... View more
12-06-2011
06:13 AM
|
0
|
0
|
1922
|
|
POST
|
Take a look at this sample that shows how to get the map extent
... View more
11-28-2011
06:45 AM
|
0
|
0
|
714
|
|
POST
|
Which version of ArcGIS are you using? For ArcGIS 9 and above, you should be using IExport instead of IExporter, along with ExportTIFF and ExportJPEG instead of TiffExporter and JPEGExporter.
... View more
11-28-2011
06:23 AM
|
0
|
0
|
622
|
|
POST
|
Instead of using the in_memory workspace, could you use a scratch workspace to store the intermediate datasets?
... View more
11-15-2011
09:01 AM
|
0
|
0
|
1962
|
|
POST
|
The way I've done it is to create a variable that contains the text with the attributes, then assign that variable to the htmlText property.
private var attributeText:String;
attributeText = "This is the Transect ID: " + graphic.attributes.TransectID;
<mx:Text width="100%" paddingLeft="10" paddingTop="10" htmlText="{attributeText}"/>
... View more
11-15-2011
08:51 AM
|
0
|
0
|
668
|
|
POST
|
This has been reported as bug NIM063795 (The Dissolve tool creates empty Shape_Length and Shape_Area fields in an in-memory output layer during background geoprocessing). This happens when the background processing is enabled, so the workaround would be to disable background processing in the Geoprocessing options dialog.
... View more
11-15-2011
06:10 AM
|
0
|
0
|
1962
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-04-2025 06:39 AM | |
| 1 | 05-01-2026 08:26 AM | |
| 1 | 04-10-2026 12:01 PM | |
| 1 | 04-13-2026 09:11 AM | |
| 1 | 10-11-2023 06:18 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|