Hello!

I am trying to get a change event working on a value object, but I just can 
not seem to get a change to occur.

Does anyone have a working example using Chnage Event?

Here is the code I have so far....

import mx.events.*;

// ActionScript Document
[ChangeEvent("configNameChanged")]

class edu.psu.uaim.data.Configuration
{
        public var currentConfig: XML;
        private var _configName: String = null;
        private var dispatcher:EventDispatcher;
        
    private static function staticConstructor():Boolean {
       EventDispatcher.initialize(Configuration.prototype);
       return true;
    }

    // Load an EventDispatcher
    private static var EventDispatcherDependency = EventDispatcher;

    private static var staticConstructed:Boolean = staticConstructor();

        [ChangeEvent("configNameChanged")]
        public function get configName(): String {
                Echo.debug("Config Name Get");
                if ((_configName == null) && (currentConfig!=null) && 
(currentConfig!=undefined)){
                        var node:XMLNode = lookup("configuration.configName");
                        _configName = node.firstChild.nodeValue;
                }
                return _configName;
        }
        
        public function set configName(name: String): Void {
                _configName = name;
                setText("configuration.configName", name);
           dispatcher.dispatchEvent({type:"configNameChanged"});
        }
}



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to