Access from another handler

Hi .

My question is follow.

Can I access the functions from one handler while being in another handler?

If you can, I’d move those functions to another object. Then handler1 and handler2 can just talk to the object with functions that can be used across multiple handlers.

  • Gabriel

Why would you want too? That is the job of models and services to increase code reuse.

You can send the handler to another, but I would be more inclined to refactor your code to move the shared code into something that can be shared better, for example create a service that both handlers can use if needed.

Regards,

Andrew Scott

http://www.andyscott.id.au/

I agree with Andrew on this, unless you are trying to reuse controller layer events?

Luis F. Majano
President
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano