Local Edit Delegate method

1942
3
Jump to solution
04-14-2014 12:01 PM
VIKRANTKRISHNA
New Contributor III
Is there a delegate method equivalent to

-(void)featureLayer:(AGSFeatureLayer *)featureLayer operation:(NSOperation *)op didFeatureEditsWithResults:(AGSFeatureLayerEditResults *)editResults{


available for local geodatabase edits. To know when geodatabase feature table edits is successful?

Thanks,
Vikrant
0 Kudos
1 Solution

Accepted Solutions
DiveshGoyal
Esri Regular Contributor
The editing methods (saveFeature:error:, and deleteFeature:error:) on AGSGDBFeatureTable are synchronous. They block until the edit is complete and return an error by reference if a problem was encountered. Hence, there is no need for a delegate. Once these methods finish, you can assume the edit has been applied to the local geodatabase (open transactions notwithstanding).

View solution in original post

0 Kudos
3 Replies
DiveshGoyal
Esri Regular Contributor
The editing methods (saveFeature:error:, and deleteFeature:error:) on AGSGDBFeatureTable are synchronous. They block until the edit is complete and return an error by reference if a problem was encountered. Hence, there is no need for a delegate. Once these methods finish, you can assume the edit has been applied to the local geodatabase (open transactions notwithstanding).
0 Kudos
VIKRANTKRISHNA
New Contributor III
Thanks for the answer Devesh.

I have two parcel layers, submitting info for feature on first layer copies feature into second layer, and feature needs to be deleted from first  layer. If executing addFeature and deleteFeature one after another, will cause issues if any one of them get error out.

One way is to revert the operation in case of error, do you think this is my best option?

Thanks,
Vikrant
0 Kudos
DiveshGoyal
Esri Regular Contributor
The API supports transactions through AGSGDBTransaction. You can use this to rollback one of the edits if the other one fails.
0 Kudos