POST
|
Thanks but I still get the same error. I've created a work around where I update the record with 'blank' data, so it appears to have been deleted when the queries run. Not ideal b/c I'll have to clean up all the blank records, but at least it will work until I can figure out why it won't delete.
... View more
03-08-2012
02:41 AM
|
0
|
0
|
1545
|
POST
|
I can update and add to my featurelayer, but when I try to delete I get FaultCode 400 invalid parameters. I can't figure out what I am doing wrong.
var deleteGraphic:Graphic=new Graphic();
deleteGraphic.attributes={OBJECTID:logBook.selectedFeatures[0].attributes.OBJECTID};
const deletes:Array=[deleteGraphic];
logBook.applyEdits(null,null,deletes, new AsyncResponder(deleteComplete, deleteFail));
... View more
03-07-2012
09:48 AM
|
0
|
6
|
5464
|
POST
|
I am trying to remove an event listener with no luck. In short the event listener is added if my address to location provides no results. The listener picks up a map click and then reverse geocodes. This part works perfectly, however I want to next remove this listener and add a new one so that the next map click calls a different function and doesn't perform another reverse geocode. Any ideas? Nothing I've come up with works and I've placed the .removeEventListener code below in several different locations in my code.
private function myMapClick(event:MapMouseEvent):void
{
reverseLocate.locationToAddress(event.mapPoint, 100);
myMap.removeEventListener(MapMouseEvent.MAP_CLICK,doNothing);
}
... View more
04-19-2011
06:15 AM
|
0
|
2
|
840
|
POST
|
I changed the code to read:
date.milliseconds=date.milliseconds + 86400000; \\adds a day
I also took out the if statement to force it to add a day every time. I'm not too happy with this fix, but it's been the only thing to get my dates to actually show up correctly in this application. Every other web app I have programmed I add a millisecond and its works fine.
... View more
12-14-2010
04:08 AM
|
0
|
0
|
784
|
POST
|
I installed the service pack this morning but I still have the date problem.
... View more
12-13-2010
08:57 AM
|
0
|
0
|
784
|
POST
|
Thanks Robert it's just what I needed. The only problem I have now is it's not catching the rest date bug and all my dates are coming up as 1 day early. Can you tell what I've done wrong with my msToDate code?
private function msToDate(ms:Number, dateFormat:String):String
{
var date:Date= new Date(ms);
if (date.milliseconds==999)
{
date.milliseconds++;
}
if (dateFormat)
{
var result:String=mydateFormat.format(date);
if (result)
{
return result;
}
else
{
return dateFormat;
}
}
else
{
return date.toLocaleString();
}
}
... View more
12-10-2010
05:03 AM
|
0
|
0
|
784
|
POST
|
is the msToDate a function you have written? I get an error on that line. I'm guessing it's a millisecond to date function?
... View more
12-09-2010
07:38 AM
|
0
|
0
|
784
|
POST
|
Is there an example anywhere of how to format a date field for a datagrid? I've tried calling a labelFunction but anytime I apply a dateformatter using code I get nothing returned. I've tried a few variations of the code below.
public function getDateLabel(item:Object,column:DataGridColumn):String
{
return dateFormat.format(item[column.dataField]);
}
... View more
12-09-2010
06:37 AM
|
0
|
7
|
1197
|
POST
|
I'm trying to use a modified version of this code to populate a dropdownlist as the application initializes, but I keep getting the error message "cannot access a property or mehtod of a null object reference.' Any ideas?
private function getcodedValues(fieldName:String):ArrayCollection
{
var returnValues:ArrayCollection=new ArrayCollection();
var fld:Object;
var cVal:CodedValue;
var cDomain:CodedValueDomain;
for each (fld in myFeatureLayer.layerDetails.fields)
{
if(fld.name==fieldName)
{
cDomain=fld.domain;
if (cDomain)
{
for each (cVal in cDomain.codedValues)
{
returnValues.addItem({label:cVal.name,data:cVal.code});
}
}
}
}
return returnValues;
}
... View more
12-03-2010
10:51 AM
|
0
|
0
|
4735
|
POST
|
I just realized my code is working-I'm almost sorry I posted. It's my event listener that fails. What am I not passing to the event listener that causes the error message?
... View more
11-19-2010
12:03 PM
|
0
|
0
|
212
|
POST
|
I've tried a couple different ways but so far this bit of code seems to have me the closest. I've got a form that is populated with the attributes of my selected feature. I can make my changes to the attributes in the form and then I have a submit button (see code). If I run the debugger 'feature' has the objectID of my selected feature and the updated attributes from the form, in an array. When I run it I get error 1009, cannot access a property or mehtod of a null object reference
protected function submitChanges_clickHandler(event:MouseEvent):void
{
var feature:Graphic=myFeatureLayer.selectedFeatures[0];
feature.attributes={OBJECTID:myFeatureLayer.selectedFeatures[0].attributes.OBJECTID,GROUP_TYPE:proType.text,NAME:proName.text, DESCRIPT:proDescript.text};
const updates:Array=[feature];
myFeatureLayer.applyEdits(null,updates,null);
myFeatureLayer.addEventListener(FeatureLayerEvent.EDITS_COMPLETE, myFeature_editsCompleteHandler);
}
... View more
11-19-2010
11:52 AM
|
0
|
1
|
558
|
POST
|
It throws the error 'could not resolve esri:TextField to a component implementation'. I tried to use a spark component, but then it doesn't pull my data into the field. I tried to add in <esri:dataProvider>, but I can't see what the next step is to point it to my active feature in the attribute inspector. I've tried the same thing on a drop down list and it will allow me to use the esri:dropdownlistfield, but it again doesn't pull in my data and the drop down list is empty instead of pointing to my domain. At this point I'm trying to edit my attributes without using the attribute inspector. If I can get that code to work then I can customize it anyway I'd like. I'm having trouble passing an array with my objectid to applyEdits(null, update, null). So far I can pass my updated attributes or my objectID but haven't successfully passed both at the same time yet.
... View more
11-19-2010
11:04 AM
|
0
|
0
|
311
|
POST
|
I feel like I'm completely missing something. I've looked at all the samples under the editor tab and each time they have a string field it shows a nice large box for the data entry (with word wrap). My out of the box solution comes up with a box about 1 inch wide and only 1 character tall. How is this larger text box accomplished?
... View more
11-15-2010
05:24 AM
|
0
|
0
|
311
|
Title | Kudos | Posted |
---|---|---|
4 | 12-05-2019 08:53 AM | |
1 | 03-07-2016 08:44 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|