I’m at a silly loss for a few aspects of CB/Wirebox that I can’t seem to grasp.
I’m using an AOP Aspect to allow for custom security annotations on event handler methods. I want to verify permissions and either proceed or use MessageBox and setNextEvent to redirect to a login page with a message regarding permissions (or lack thereof).
Issue 1
In the aspect, inject MessageBox via inject=“coldbox:plugin:MessageBox” and when I attempt to call setMessage on that property, I get an error that my message box property is a string and does not have the method setMessage.
I imagine this is similar to my issues with the race condition where I attempt to inject some module settings in another dependency for that aspect. Luis, you suggested I use a provider. How might I set that up? for these dependencies:
- coldbox:plugin:MessageBox
- coldbox:setting:mySetting@MyModule
Issue 2
When I attempt to call any of the FrameworkSupertype methods which are clearly present on the Aspect when I writedump(this), I get errors that those methods are undefined.
Why would this happen, and how do I handle it?
Thanks a ton for the assistance!
Cheers,
-ben