I'm upgrading my Unity application to 3.2 RC1... I seem to be finding that 
onQueueComplete does not fire reliably.  I use it to share a utility 
library and a design theme prior to rendering the queued views.  There are 
two instances where it doesn't seem to fire:

* event not found (~404, fails 100% of the time to fire onqueuecomplete)
* Initial load (of the domain just domain.com/, this one fails about 50% of 
the time)

My controllers.xml looks like:

<controller name="ThemeController" type="controller.ThemeController">
   <message-listener message="onQueueComplete" function="shareTheme" />
</controller>

ThemeController (which works perfectly fine the rest of the time) looks 
like:

<cffunction name="shareTheme" access="public" returntype="void" 
output="false">
    <cfargument name="event" type="ModelGlue.Core.Event" required="true" />

    <cflog file="application" text="OnQueueComplete() sharing theme: 
#getSessionService().getTheme()#..." />
    <cfset arguments.event.setValue("theme", 
getThemeService().getTheme(getSessionService().getTheme())) />
</cffunction>

I don't get the CFLOG output on initial load nor when I try and request an 
event that doesn't exist.  In both cases I wind up getting an error 
indicating that the theme object is not defined because shareTheme is never 
executed.  It works fine the rest of the time.

I've dug into the code a bit but I can't determine why it wouldn't fire... 
it *seems* to have something to do with when MG internally redirects (e.g., 
from event not found to exception handler, and maybe from 'no event' to 
'default event' during initial load), it fails to fire onQueueComplete.  In 
Invocation.cfc, the only instance of calling executeEventQueue() with the 
true parameter to trigger the onQueueComplete broadcast, the code that 
throws errors for missing events is just above it.  I don't think it can 
ever get to a place where executeEventQueue is called with true as a 
parameter in that instance.

Any ideas?


Brian


-- 
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

Reply via email to