Plugin Manager for smartfox

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
yaswanth
Posts: 32
Joined: 27 Sep 2008, 21:02

Plugin Manager for smartfox

Post by yaswanth »

Hi,

I am planning to develop a plugin manager for my smartfox extension.
In brief, I would want to implement a functionality that is independent of the extensions but would get executed before and after handleEvent() and handleInternalEvent.
like

Code: Select all

public function preHandleEvent(command c, ...other args);
public function postHandleEvent(command c, ...other args);

public function preHandleInternalEvent(command c, ...other args);
public function postHandleInternalEvent(command c, ...other args);
Is this possible?

I can do something like

Code: Select all


public function handleEvent(....)
{
    pluginManager.preHandleEvent() 
     /*
      * App logic
      */
    pluginManager.postHandleEvent()
}

public function handleInternalEvent(....)
{
    pluginManager.preHandleInternalEvent() 
     /*
      * App logic
      */
    pluginManager.postHandleInternalEvent()
}
But I don't want to do that. I have looked at registerForEvents() but no doc of any sort is available.

Lapo, can you help?

Regards,
Yaswanth
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

No I am sorry, this is not possible.
Lapo
--
gotoAndPlay()
...addicted to flash games
yaswanth
Posts: 32
Joined: 27 Sep 2008, 21:02

Catching events

Post by yaswanth »

Thanks Lapo for a quick short reply :-)

Is there a way I catch the events that go to other extensions?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

No. Each extension listens for the events in its own scope.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply