GPRecordSet Error

350
2
11-14-2011 07:42 AM
GrahamWhelan
New Contributor
Hi

I've spent a full day trying to figure this out but I cannot see any reason why my application is throwing the following error. I have two widgets compiled against the 2.3.1 api which basically take a feature from the viewer and passes it into a GpTask. If I run them separately both widgets work fine.

However if I run one widget then the other, the second one throws the error, no matter what order. In fact I only have to open either of them and then try to run the other and it throws the error. I have spent the day commenting out the code in each widget line by line to the point where the no code is being ran.

The Gp Task is on ArcGis server 10. Can I get access to the code referenced in the code below and/or has anyone encountered this problem?

Thanks,
Graham

ReferenceError: Error #1069: Property displayFieldName not found on com.esri.ags.tasks.supportClasses.GPRecordSet and there is no default value.
      at com.esri.ags::FeatureSet$/http://www.esri.com/2008/ags/internal::toFeatureSet()
      at com.esri.ags.tasks.supportClasses::ParameterValue$/http://www.esri.com/2008/ags/internal::toValue()
      at
Tags (2)
0 Kudos
2 Replies
GrahamWhelan
New Contributor
I found what was causing the problem by creating a new widget and copying in each bit one by one to the point that it failed. I dont understand why it caused the issue but

private var gp:Geoprocessor = new Geoprocessor();

was in the global variable declarations at the top of my widget and that stopped the geoprocessor in my other widget from functioning. Can anyone give me an explanation for why this is a problem, or is it some underlying API issue.

Thanks,
Graham
0 Kudos
GrahamWhelan
New Contributor
I have moved the Geoprocessor declaration down to an isolated function which is only called on a button click. Even if it is declared and never instanciated it throws the error. When the declaration is commented out it works fine. Is there an issue where 2 Geoprocessor's cannot be instanciated at the same time in a flex viewer?
0 Kudos