All [Event] metadata is inherited by the
subclass so you shouldn’t have any problems. But you can’t dispatch
the event, you have to have it declared on the class definition for MXML to
pick it up.
Matt
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of svktiilikainen
Sent: Monday, August 01, 2005 1:48
AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Custom event
& inheritance
Hi all,
how should a custom event be used in subclasses?
I have a custom event specified in the prototype
of an AS class, say
ScrollSelectList. Now I want to use the event in
an instance of a
subclass of ScrollSelectList, say DataGrid. If I
just write something
like
<mx:DataGrid id="myGrid"
event-name="function-name">,
'event-name' being the event to catch, Flex throws
an error
"unknown attribute 'event-name' on
myGrid".
The event handling works just fine when used in
the parent
(ScrollSelectList) class instance.
Should the event be declared somehow for subclass
as well?
Thanks,
Satu
--
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
|
- RE: [flexcoders] Custom event & inheritance Matt Chotin
-