Erg, stupid system. I tried replying once, it didn't show up. So I went into my browser history to find the post again so I wouldn't have to type it again, but it turned out to be my original post! You should switch me off of moderated. :P
Thanks for pointing that out, I somehow totally missed that message- subscibers were available in 1.6 all this time. I had it in my head it was a 1.8 feature. Thanks for posting that peter. I'm writing that as we speak, though It may come in a couple of wiki updates. On Mar 4, 1:58 pm, Brian Pickens <[email protected]> wrote: > Hi all, i know its been a long time since I've been on the forums but > I've been chugging along pretty well with MachII 1.6 :) > > My question is about the new 1.8. Since the generated APIs aren't > available yet, I was wondering if it was possible to notify a message- > subscriber from the listener and what the syntax would be for that? > > On Mar 3, 6:03 pm, "Peter J. Farrell" <[email protected]> wrote: > > > > > No problem. In general, the public API in the framework rarely changes > > between version. This code is the same for 1.6 or 1.8. Also, you can > > also look at the source code: > > >https://greatbiztoolsllc.trac.cvsdude.com/mach-ii/browser/framework/1... > > > The main hub in Mach-II for internal calls always starts with AppManager. > > > Here's the code: > > > <!--- Get the message handler ---> > > <cfset var messageHandler = > > getAppManager().getMessageManager().getMessageHandler("nameOfMessage") /> > > > <!--- By design, we don't make the eventContext available in listeners > > (I'll leave of the laundry list of reasons) > > but the message handler needs it it this case ---> > > <cfset var eventContext = > > getAppManager().getRequestManager().getRequestHandler().getEventContext() /> > > > <!--- Notify the message ---> > > <cfset var result = messageHandler.handleMessage(arguments.event, > > eventContext) /> > > <!--- The message handler returns boolean if it was able to successfully > > broadcast all the messages ---> > > > If your message handler is not set to wait for threads to join, you can > > get at the list of thread ids to use via cfthread. It is an array of > > ids in event.getArg("_publishThreadIds", ArrayNew(1) /> > > > Do you think you could do me a favor since I answered the question on > > the list and add in this documentation to the wiki? I'd really > > appreciate you taking the time to do that for the project. A great > > place to add this, would be to add in an "Advanced Techniques" section > > right before this section on this wiki entry: > > >https://greatbiztoolsllc.trac.cvsdude.com/mach-ii/wiki/IntroToMessage... > > > HTH, > > .Peter > > > Brian Pickens said the following on 03/03/10 16:17: > > > > Hi all, i know its been a long time since I've been on the forums but > > > I've been chugging along pretty well with MachII 1.6 :) > > > > My question is about the new 1.8. Since the generated APIs aren't > > > available yet, I was wondering if it was possible to notify a message- > > > subscriber from the listener and what the syntax would be for that? -- You received this message because you are subscribed to Mach-II for CFML list. 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/mach-ii-for-coldfusion?hl=en SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/ Wiki / Documentation / Tickets: http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/
