I haven't been following this thread, but
if you find yourself putting the same 'change' handler on each instance of your
TimeText component, then you should instead make that handler part of the
DEFINITION of that component. Although you could accomplish that by
registering it in an override of createChildren(), it would be more natural to
put it on the base tag of your component definition. It sounds like your
TimeText is an MXML component extending TextInput. In that case, TimeText.mxml
should look like this: TimeTextt.mxml: <mx:TextInput
change="processTime(event)"> <mx:Script>
private function procesTime(event:Event):void
{
...
}
</mx:Script> </mx:TextInput> That way, you can just write instances as <comp:TimeTextt>
and every one will automatically have processTime() as its change handler. This is similar conceptually to defining
the component OKButton.mxml:
<mx:Button label="OK"/> and writing <comp:OKButton/> instead
of <mx:Button label="OK"/>. Here you've set a property, rather
than an event handler, as part of the component's definition so you don't have
to set it on each instance. - Gordon From: Well Thanks, of course, it works FINE now, with your
suggestion. -- 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
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
- RE: [flexcoders] Re: can NOT call method in component - Impor... Gordon Smith