dynamically adding some feature layers & trying to add listeners to each graphic in the feature to do some editing. debugging is showing that the feature layers graphic provider is initially empty (or i guess not fully loaded). if the editing mode (snippet shown below) is run a 2nd time, the feature layers graphic providers are filled & the event listeners are added ok.is there some trick to this? a standard way to make sure the feature layers graphic providers fully loaded?thanks.
var key:String;
var graphic:Graphic;
for (key in editableLayers) {
editableLayers[key].visible=true; // show over map service
for each(graphic in editableLayers[key].graphicProvider) {
graphic.addEventListener(MouseEvent.CLICK,clickFeatureHandler,false);
}
}