Laurent, Your class "User" must extend UIObject to inherit the method addEventListener(), unless you create the method yourself...
Cheers Rich -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Laurent Cornelis Sent: 25 May 2005 13:21 To: flexcoders@yahoogroups.com Subject: [flexcoders] Register a ChangeEvent listener on a static property Hello, I have a question: is there a way to register a changeEvent listener on a static property ? For example : class ModelLocator { [ChangeEvent("userChanged")] public static var user : User; } class AnotherClass { public function AnotherClass() { ModelLocator.user.addEventListener("userChanged", this); } ... } But here, I have this error : There is no method with the name 'addEventListener'. Regards, Laurent Cornelis Yahoo! Groups Links 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/