WestonSF / ArcGISFlexViewerTOCGroupWidget

Table of Contents Group Widget for ArcGIS Viewer for Flex 3.x
1 stars 4 forks source link

Error when add as Flex module to flexviewer project #1

Open hathachgis opened 10 years ago

hathachgis commented 10 years ago

Hi,

I download the source code and add it to my flex project but got this error. What does it mean? 1119: Access of possibly undefined property SUSPEND_TOC_HIDE_TIMER through a reference with static type class.

WestonSF commented 10 years ago

Oh okay sorry about that, it seems that it works with Flex Viewer 3.5 but not 3.6 as that property ("SUSPEND_TOC_HIDE_TIMER") is missing from the AppEvent.as. The quickest fix would be to add this:

public static const SUSPEND_TOC_HIDE_TIMER:String = "suspendTOCHideTimer";

Into the AppEvent.as file, which is under come.esri.viewer.

Let me know how it goes.

hathachgis commented 10 years ago

Thanks to Robert Scheitlin, I was able to get this widget updated to 3.6. I would like to share this new code with you.

In TocLayerMenu.mxml

private function bordercontainer1_rollOverHandler(event:MouseEvent):void { AppEvent.dispatch(AppEvent.RESET_TOC_HIDE_TIMER, "true"); }

        private function bordercontainer1_rollOutHandler(event:MouseEvent):void
        {
            AppEvent.dispatch(AppEvent.START_TOC_HIDE_TIMER, null);
        }

In TransparencyMenuItem.mxml

protected function transparencyBorderContainer_rollOverHandler(event:MouseEvent):void { AppEvent.dispatch(AppEvent.RESET_TOC_HIDE_TIMER, "true"); }

        protected function transparencyBorderContainer_rollOutHandler(event:MouseEvent):void
        {
            AppEvent.dispatch(AppEvent.START_TOC_HIDE_TIMER, null);
        }