[flexcoders] Re: Custom event & inheritance

2005-08-03 Thread svktiilikainen
Hi,

and thanks so far. Obviusly, event inheritance does not work the way I 
described. What I really wanted to know was that "[Event] metadata 
should be inherited by the subclasses", not needing to do anything 
else to use an inherited event in a subclass. So now 'it's time for 
something completely different', meaning, the event inheritance must 
be done another way. Thanks for the information!
 
Satu







 Yahoo! Groups Sponsor ~--> 
http://us.ard.yahoo.com/SIG=12hbetumg/M=362131.6882499.7825260.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123139548/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy.
~-> 

--
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/
 





RE: [flexcoders] Re: Custom event & inheritance

2005-08-02 Thread Matt Chotin










You manipulated the prototype?  As in you worked
on A.prototype…?  I can’t see how that would work in MXML and do
the right thing.  In order to understand the attribute we need to see the
[Event] metadata on the class definition, this means having access to the
source.  Assuming you do have access to the source your [Event] metadata should
be inherited by the subclasses.  It’s sounding like that’s not
happening for you.  I think we’ll need to see a working (or I guess in
this case non-working) example, not just pseudocode to see if we can figure out
what’s going on.

 

Matt

 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of svktiilikainen
Sent: Tuesday, August 02, 2005
5:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Custom
event & inheritance



 

Hello,

I already commented this but the message appears
to have 
disappeared - another try.

Explanation:
In the Application AS file, the prototype of a
standard class A is 
manipulated so that the class has event E. The
event is dispatched 
with "this.dispatchEvent({target:this,type:"E",...});


Now if I specify an event handler in an MXML file
like 
E="doSomething()"/>, everything works
just fine.

But: I also want to use class B which extends
class C extending 
class A, ie. B is a subclass of A. If I write like
before 
id="id"
E="doSomethingElse()"/>, the compiler says that the E 
attribute is unknown.

So, this E event has to be declared all over again
for class B?? 
What exactly does this mean?

Satu


--- In flexcoders@yahoogroups.com,
"Matt Chotin" <[EMAIL PROTECTED]> 
wrote:
> 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 
> ,
> '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 
> 
>  
> 
> *  Visit your
group "flexcoders
> <http://groups.yahoo.com/group/flexcoders>
" on the web.
>     
> *  To
unsubscribe from this group, send an email to:
>  
[EMAIL PROTECTED]
>

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











--
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



   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] Re: Custom event & inheritance

2005-08-02 Thread svktiilikainen
Hello,

I already commented this but the message appears to have 
disappeared - another try.

Explanation:
In the Application AS file, the prototype of a standard class A is 
manipulated so that the class has event E. The event is dispatched 
with "this.dispatchEvent({target:this,type:"E",...}); 

Now if I specify an event handler in an MXML file like , everything works just fine.

But: I also want to use class B which extends class C extending 
class A, ie. B is a subclass of A. If I write like before , the compiler says that the E 
attribute is unknown.

So, this E event has to be declared all over again for class B?? 
What exactly does this mean?

Satu
 

--- In flexcoders@yahoogroups.com, "Matt Chotin" <[EMAIL PROTECTED]> 
wrote:
> 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:[EMAIL PROTECTED] 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 
> ,
> '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 
> 
>  
> 
> *  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  . 
> 
>  
> 
> 





 Yahoo! Groups Sponsor ~--> 
http://us.ard.yahoo.com/SIG=12h3fusvu/M=362131.6882499.7825260.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1122993044/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy.
~-> 

--
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/