Re: [Flashcoders] Events for custom classes?

2007-04-03 Thread Helmut Granda
On 4/3/07, Helmut Granda [EMAIL PROTECTED] wrote: Jason, Were you able to figure this out exactly the way you wanted it? -h On 2/16/07, Merrill, Jason [EMAIL PROTECTED] wrote: Ah - nevermind - figured out I had removed the scope to my webservice and forgot to put it back in. Delegate

RE: [Flashcoders] Events for custom classes?

2007-04-03 Thread Merrill, Jason
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Helmut Granda Sent: Tuesday, April 03, 2007 12:35 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Events for custom classes? On 4/3/07, Helmut Granda [EMAIL PROTECTED] wrote: Jason, Were you able

RE: [Flashcoders] Events for custom classes?

2007-04-03 Thread David Ngo
Of Merrill, Jason Sent: Tuesday, April 03, 2007 9:47 AM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Events for custom classes? Actually, I had been meaning to post again because I had lost my code for getting EventDispatcher working between two classes. Someone posted a response here

Re: [Flashcoders] Events for custom classes?

2007-04-03 Thread john robinson
Is this what you're looking for? http://www.adobe.com/devnet/flash/articles/creating_events.html john On Apr 3, 2007, at 12:46 PM, Merrill, Jason wrote: Actually, I had been meaning to post again because I had lost my code for getting EventDispatcher working between two classes. Someone

RE: [Flashcoders] Events for custom classes?

2007-04-03 Thread Merrill, Jason
@chattyfig.figleaf.com Subject: RE: [Flashcoders] Events for custom classes? You'll need a reference of the dispatching class in your listener class to receive events: // broadcasting class import mx.events.EventDispatcher; class EventClass { // EventDispatcher methods public var

Re: [Flashcoders] Events for custom classes?

2007-04-03 Thread Muzak
login_frm.hide(); view_frm.show(); } } Does this help? regards, Muzak - Original Message - From: Merrill, Jason [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 03, 2007 6:46 PM Subject: RE: [Flashcoders] Events for custom classes? Actually, I had

RE: [Flashcoders] Events for custom classes?

2007-04-03 Thread David Ngo
10:46 AM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Events for custom classes? You'll need a reference of the dispatching class in your listener class to receive events: // broadcasting class import mx.events.EventDispatcher; class EventClass { // EventDispatcher

RE: [Flashcoders] Events for custom classes?

2007-04-03 Thread Merrill, Jason
Subject: Re: [Flashcoders] Events for custom classes? Is this what you're looking for? http://www.adobe.com/devnet/flash/articles/creating_events.html john On Apr 3, 2007, at 12:46 PM, Merrill, Jason wrote: Actually, I had been meaning to post again because I had lost my code for getting

Re: [Flashcoders] Events for custom classes?

2007-04-03 Thread eka
@chattyfig.figleaf.com Subject: RE: [Flashcoders] Events for custom classes? Actually, I had been meaning to post again because I had lost my code for getting EventDispatcher working between two classes. Someone posted a response here and I lost it, as well as my code that was working. if anyone can post

RE: [Flashcoders] Events for custom classes?

2007-04-03 Thread Merrill, Jason
, April 03, 2007 2:09 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Events for custom classes? Here's a stripped down version (i just left in the methods that dispatch en event) of my Form base class that uses EventDispatcher. This class is usually extended by other classes

Re: [Flashcoders] Events for custom classes?

2007-04-03 Thread Helmut Granda
@chattyfig.figleaf.com Subject: RE: [Flashcoders] Events for custom classes? Actually, I had been meaning to post again because I had lost my code for getting EventDispatcher working between two classes. Someone posted a response here and I lost it, as well as my code that was working. if anyone can

Re: [Flashcoders] Events for custom classes?

2007-04-03 Thread Helmut Granda
Leadership Development eTools Multimedia Team -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: Tuesday, April 03, 2007 2:09 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Events for custom classes? Here's a stripped down

RE: [Flashcoders] Events for custom classes?

2007-04-03 Thread David Ngo
@chattyfig.figleaf.com Subject: Re: [Flashcoders] Events for custom classes? Thanks for this sample David, Just a small correction: public function ListenerClass(eventClass:MyEventClass) should be public function ListenerClass(eventClass:EventClass); Correct? -h On 4/3/07, David Ngo [EMAIL PROTECTED

Re: [Flashcoders] Events for custom classes?

2007-02-16 Thread Helen Triolo
Use EventDispatcher: How: http://chattyfig.figleaf.com/pipermail/flashcoders/2006-February/160302.html Why: http://chattyfig.figleaf.com/pipermail/flashcoders/2004-June/114320.html found with Muzak's archive search tool: http://muzakdeezign.com/flashcoders/ Helen Merrill, Jason wrote:

Re: [Flashcoders] Events for custom classes?

2007-02-16 Thread John Grden
I'm not sure if you're asking for this level of explanation or not Jason, but this might help: I use a BaseClass.as to extend so that I can dispatch events via GDispatcher: import com.blitzagency.xray.logger.XrayLog; import com.gskinner.events.GDispatcher; /** * @author John Grden */ class

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
] On Behalf Of Helen Triolo Sent: Friday, February 16, 2007 10:15 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Events for custom classes? Use EventDispatcher: How: http://chattyfig.figleaf.com/pipermail/flashcoders/2006-Februa ry/160302.html Why: http://chattyfig.figleaf.com/pipermail

Re: [Flashcoders] Events for custom classes?

2007-02-16 Thread John Grden
Oh and the last part, dispatching the event: from BaseMain.as: dispatchEvent( { type:SOMETHING_COMPLETE } ); hth, On 2/16/07, John Grden [EMAIL PROTECTED] wrote: I'm not sure if you're asking for this level of explanation or not Jason, but this might help: I use a BaseClass.as to extend

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
Subject: Re: [Flashcoders] Events for custom classes? I'm not sure if you're asking for this level of explanation or not Jason, but this might help: I use a BaseClass.as to extend so that I can dispatch events via GDispatcher: import com.blitzagency.xray.logger.XrayLog; import

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Holth, Daniel C.
Here is your code modified to use the EventDispatcher: import mx.events.EventDispatcher; // import the event dispatcher class com.boa.projects.iqrcgenerator.components.AdminData{ public var addEventListener:Function; // Set the functions public var removeEventListener:Function;

Re: [Flashcoders] Events for custom classes?

2007-02-16 Thread Helen Triolo
If you use dispatchEvent from any class, any other class that's listening for it can respond. No scope issues that I can see. I have a simple example of two classes talking to each other using EventDispatcher at http://flash-creations.com/notes/sample_emailer.php if you want it -- click the

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
mailing list Subject: RE: [Flashcoders] Events for custom classes? Here is your code modified to use the EventDispatcher: import mx.events.EventDispatcher; // import the event dispatcher class com.boa.projects.iqrcgenerator.components.AdminData{ public var addEventListener:Function; // Set

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Alain Rousseau
Also if you want to create your own onResult Event (it's not a real event) you can do this without EventDispatcher or listeners : class com.boa.projects.iqrcgenerator.components.AdminData{ public var onResult:Function; private var userData:Object; public function

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
: RE: [Flashcoders] Events for custom classes? Also if you want to create your own onResult Event (it's not a real event) you can do this without EventDispatcher or listeners : class com.boa.projects.iqrcgenerator.components.AdminData{ public var onResult:Function; private var

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
, 2007 10:36 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] Events for custom classes? Here is your code modified to use the EventDispatcher: import mx.events.EventDispatcher; // import the event dispatcher class com.boa.projects.iqrcgenerator.components.AdminData{ public var

Re: [Flashcoders] Events for custom classes?

2007-02-16 Thread Matthew Ganz
- From: Merrill, Jason [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Friday, February 16, 2007 2:35 PM Subject: RE: [Flashcoders] Events for custom classes? Daniel, try as I may, I can't get your code to work. I have one class, which has a combobox

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Alain Rousseau
} } Now you have them both communication the way you want Have fun ! Alain -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: 16 février 2007 14:36 To: Flashcoders mailing list Subject: RE: [Flashcoders] Events for custom classes

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
do you have a reference to the class that is broadcasting the event in the class that's listening for the event? Yes, that's this part of his code: myAdminData.addEventListener(eventOnResult, r); Where he has r = this in his code Jason Merrill Bank of America Learning Organizational

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
mailing list' Subject: RE: [Flashcoders] Events for custom classes? Jason, So if I understand clearly what you want to do is : From Class A : (pseudo code following) class ClassA { private var instClassB:ClassB; make comboBox make datagrid function ClassA

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Holth, Daniel C.
the changes occur. ~Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matthew Ganz Sent: Friday, February 16, 2007 1:48 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Events for custom classes? do you have a reference to the class that is broadcasting

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Karina Steffens
. Karina -Original Message- From: Merrill, Jason [mailto:[EMAIL PROTECTED] Sent: 16 February 2007 20:16 To: Flashcoders mailing list Subject: RE: [Flashcoders] Events for custom classes? Thanks Alain, will revist it that way instead. Jason Merrill Bank of America Learning

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
I think Matthew has what you are looking for. Alain's solution should do what you want too. Thanks Daniel - nice approach, I like it. It's always the design patterns stuff that kills me. I've read a lot about them, but it's hard to know how to apply to specific projects sometimes, so I do a

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
list' Subject: RE: [Flashcoders] Events for custom classes? Hi Jason, I have my own implementation of AsBroadcaster/EventDispatcher (bundling both in one class), which is very flexible and can be used with inheritance or composition (But unlike the standard implementations, it's not a mix

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Rost, Andrew
Subject: RE: [Flashcoders] Events for custom classes? Sure, yes - please send offlist . Thanks! Jason Merrill Bank of America Learning Organizational Effectiveness -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Karina Steffens Sent

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
PROTECTED] On Behalf Of Alain Rousseau Sent: Friday, February 16, 2007 3:01 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] Events for custom classes? Jason, So if I understand clearly what you want to do is : From Class A : (pseudo code following) class ClassA { private var

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Friday, February 16, 2007 4:37 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Events for custom classes? Alain, Been following your suggested method, it's great, and everything works as advertized, except

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Alain Rousseau
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: 16 février 2007 16:37 To: Flashcoders mailing list Subject: RE: [Flashcoders] Events for custom classes? Alain, Been following your suggested method, it's great, and everything works as advertized, except

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
Rousseau Sent: Friday, February 16, 2007 5:09 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] Events for custom classes? Jason, By the look of it, you will never receive an onResult for your getUserListResult ... it's a simple Object and no Method onResult exists for that class

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Merrill, Jason
Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Friday, February 16, 2007 5:18 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Events for custom classes? I am using the Webservice component. It has a built-in onResult event, and works

Re: [Flashcoders] Events for custom classes?

2007-02-16 Thread Muzak
, February 16, 2007 9:40 PM Subject: RE: [Flashcoders] Events for custom classes? I think Matthew has what you are looking for. Alain's solution should do what you want too. Thanks Daniel - nice approach, I like it. It's always the design patterns stuff that kills me. I've read a lot about them

RE: [Flashcoders] Events for custom classes?

2007-02-16 Thread Karina Steffens
To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] Events for custom classes? Can you please email your class to me as well [offlist]. I'm working on almost the same thing as Jason. Thanks much, Andrew Rost IDEXX Computer Systems -Original Message- From: Merrill