Your callback function will be inside the event listener and not inside
the MlEditmanager class. E.g. if you're listening for events in the Main
class, you can have a function defined inside Main any way you want.
Whenever that event is triggered, your function will be called.

You do not need any functions other than the ones declared in IEventListener
to dispatch events from MlEditmanager.

.p


On Thu, Sep 30, 2010 at 12:31 PM, Harish Vardhan <[email protected]>wrote:

> can i use call back function for example.. private var xyz:Function;
>
> how to use this?
>
> ------------------------------
> *From:* Pranav Negandhi <[email protected]>
> *To:* [email protected]
> *Sent:* Thu, September 30, 2010 5:34:52 AM
> *Subject:* Re: [flex_india:31604] Call back functions in flex
>
> You can do this using composition. Store an instance of EventDispatcher as
> a private member variable called m_dispatcher. Then implement
> IEventDispatcher in MlEditmanager. Delegate addEventListener, dispatchEvent,
> removeEventListener and hasEventListener to m_dispatcher.
>
> public class MlEditmanager extends EditManager implements IEventDispatcher
> {
>     private var m_dispatcher:IEventDispatcher;
>
>     public function MlEditmanager()
>     {
>         this.m_dispatcher = new EventDispatcher();
>     }
>
>     public function addEventListener(type, listener, useCapture, priority,
> useWeakReference)
>     {
>         this.m_dispatcher.addEventListener(type, listener, useCapture,
> priority, useWeakReference);
>     }
>
>     public function removeEventListener()
>     {
>         // Implement in the same way
>     }
> }
>
> HTH.
>
> .p
>
> On Wed, Sep 29, 2010 at 7:07 PM, Harish Vardhan 
> <[email protected]>wrote:
>
>> i have MlEditmanager class which extends EditManager class. I also want to
>> extend Eventdispatcher .. but it is not possible to extend more than one
>> class ...
>>
>> so the work around can be to create call back function.
>>
>> Can someone help me how to achieve this?
>>
>> Urgent pls.
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Flex India Community" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<flex_india%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/flex_india?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to