I am having the same problem when using getInitialEventHandlerName() in
onRequestStart of one of my controllers. Has this not been resolved.
Should I just use, arguments.event.getValue(event.getValue("eventValue")) as
stated by Ezra?
On Tue, May 26, 2009 at 10:56 AM, Ezra Parker <[email protected]> wrote:
>
> Dan,
>
> I'm afraid that in MG 3 these methods both fail when called from an
> onRequestStart message listener function. I ran into this when testing
> out the upgrade of an MG 2 application for the documentation effort,
> and I evidently neglected to copy you on the message to the docs list
> where I detailed the issues I ran into -- here is the relevant
> portion:
>
>
> The application was referencing the name of the currently-executing
> event by calling arguments.event.getEventHandlerName() in the
> onRequestStart event handler. Although this may not have been the best
> approach, it worked fine under Unity, but throws "You have attempted
> to dereference a scalar variable of type class java.lang.String as a
> structure with members." in Gesture. I should note that this method
> appears to work as expected when called in the context of the actual
> executing event, it was only failing when invoked in the
> onRequestStart handler.
>
> After investigating a little bit, I discovered that
> getEventHandlerName() internally calls getInitialEventHandler().name,
> but if it is called in onRequestStart, getInitialEventHandler()
> returns an empty string.
>
> This appears to be an intentional change, as the private property
> returned (variables._initialEvent) is being set inside a boolean test
> against variables._readyForExecution, which in turn is set by the
> prepareForInvocation() method, and there is a comment immediately
> above the call to that method (in
> /ModelGlue/gesture/eventrequest/phase/Invocation.cfc) that reads:
> "Prepare for invocation _after_ queuing onRequestStart".
>
> I was able to work around this by changing
> arguments.event.getEventHandlerName() to
> arguments.event.getValue(event.getValue("eventValue")). As a side
> note, I see that there is presently a minor issue logged at
> bugs.model-glue.com requesting a convenience method for this.
>
>
> The ticket I referenced is one that was ported over from JIRA:
>
> http://docs.model-glue.com/ticket/333
>
> --
> Ezra
>
>
--
David Mineer Jr
---------------------
The critical ingredient is getting off your
butt and doing something. It's as simple
as that. A lot of people have ideas, but
there are few who decide to do
something about them now. Not
tomorrow. Not next week. But today.
The true entrepreneur is a doer.
--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog
You received this message because you are subscribed to the Google
Groups "model-glue" 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/model-glue?hl=en