Good thought, I tried that first, since the example show you doing it that way. Unfortunately I get the following error:
Any other ides would be appreciated!
-- Carolyn
At 11:14 PM 1/25/2006, Matt Chotin wrote:
Take out the dispatcher.dispatchEvent, just leave it as dispatchEvent.
You don't need a dispatcher property at all.
Matt
-----Original Message-----
From: [email protected] [ mailto:[email protected]] On
Behalf Of Carolyn Cole
Sent: Monday, January 23, 2006 6:59 AM
To: [email protected]
Subject: [flexcoders] ChangeEvent
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
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders " on the web.
- To unsubscribe from this group, send an email to:
- [EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

