|
Lee,
we have the ability to do what you want by calling the FB recursively (you can
even call it recursively using multiple fuses in the FuseQ). That's covered in
one of the chapters in John and my book and I'm sure Nat and Jeff cover it in
their book.
John
and I went over this very process of immediately executing an added fuseaction
to the queue, but since the PRESENT fuseaction would have to be terminated, the
code you show couldn't work (without a recursive call to the
FB).
I've
found that using FuseQ is extremely helpful in implementing
Model-View-Controller architecture as well as abstracting common functionality
to a parent. For example, if I have this circuit structure:
Employee
SalariedEmployee
HourlyEmployee
ContractEmployee
and if
I then want to create a new employee (either salaried, hourly, or contract), I
probably have some similar things I do for each of them. Rather than having
duplicate code in each of the three employee types, I can abstract this to the
Employee circuit and then use this code:
<cfcase value="new">
<cfset SuperQ() />
<cfinclude template="act_DoThis"
/>
</cfcase>
If I
need the SuperQ to execute immediately, I can do this:
<cfcase value="new">
<cfset SuperQ() />
<cfset AddToQ( 'SalariedEmployee.doNew'
)>
</cfcase>
I don't know about the "atomic" argument,
either, but the other stuff in FuseQ is sure
nice.
==^================================================================ This email was sent to: [email protected] EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9 Or send an email to: [EMAIL PROTECTED] T O P I C A -- Register now to manage your mail! http://www.topica.com/partner/tag02/register ==^================================================================ |
Title: Message
- FuseQ and XFAs John Farrar
- Re: FuseQ and XFAs Lee Borkman
- Re: FuseQ and XFAs John Quarto-vonTivadar
- Re: FuseQ and XFAs Erki Esken
- RE: FuseQ and XFAs Patrick McElhaney
- Re: FuseQ and XFAs John Quarto-vonTivadar
- Re: FuseQ and XFAs hal helms
- Re: FuseQ and XFAs Lee Borkman
- RE: FuseQ and XFAs hal helms
- Re: FuseQ and XFAs Lee Borkman
- Re: FuseQ and XFAs Evan Wilders
- RE: FuseQ and XFAs hal helms
- RE: FuseQ and XFAs Evan Wilders
- RE: FuseQ and XFAs hal helms
- Re: FuseQ and XFAs John Quarto-vonTivadar
- RE: FuseQ and XFAs Brian Kotek
- RE: FuseQ and XFAs Andy
