Select to view content in your preferred language

2 Editors one map

983
2
06-26-2012 07:59 AM
SachaTousignant
Regular Contributor
Hey,

I've been working on my flex app and I'm trying to resolve the following problem :

I have 2 widgets, they both have one editor in them and whenever I open either one and open the 2nd one, then it crashed with the following error message :
TypeError: Error #1034: Failure of the type constraint: conversion from com.esri.ags.components::TemplatePicker@c5550b1 to com.esri.ags.components.TemplatePicker impossible.

I tried to use my own skin for both of my editors, one skin per editor ( I took the skin from the api and only renamed it). Same problem but the error message is different : TypeError: Error #1009: Cannot access a property or method of a null object reference.

I also tried to catch the event when I get the error messages but it doesn't work either. I used :

    
<esri:Editor id="editorFatalities"        
         geometryService="{myGeometryService}" 
         map="{map}"
         featureLayers="{[incidentsPoints]}"
         toolbarVisible="true"
         skinClass="com.esri.solutions.flexviewer.themes.surete.AccidentsEditorSkin"
         fault="editor_OnFault(event)"/>

I could have throw an alert and tell the user to shut the other widget..


Any help would be really appreciated since I got no other ideas what to do with this.
Tags (2)
0 Kudos
2 Replies
SachaTousignant
Regular Contributor
I tried a different approach, instead of using editors, I tried to use templatepicker as this sample recommands : http://resources.arcgis.com/en/help/flex-api/samples/index.html#//01nq00000043000000

But, I just noticed that the same problem is happening, once I open one of my widget, when I try to open the other one, it crashes. Even with 2 differents skinclass. So, does it mean it is not possible to have 2 editors or 2 templatepickers at the same time open or there's a workaround?

Thx alot!
0 Kudos
SachaTousignant
Regular Contributor
Still need help, can someone from Esri answer this?


I had the idea for now to program my own templatepickers, images with events on click and all.
But I'd really appreciated to know if it's possible to have 2 templatepickers, one in each widget in my case.

Ty
0 Kudos