Dan,
I've posted the code.
Here's the init() that is not firing.
<cffunction name="init" access="public" hint="Constructor.">
<cfargument name="updateFormScope" type="boolean"
required="true"
default="true" hint="If true, adds the collections to the form
scope." />
<cfargument name="trimFields" type="boolean" required="true"
default="true" />
<cfset variables.instance.updateFormScope =
arguments.updateFormScope />
<cfset variables.instance.trimFields = arguments.trimFields />
<cfreturn this />
</cffunction>
I don't think there is any issue with the cfc itself. I think it has
something to do with the way the "helpers" scope works. Is "helpers"
a scope or is it more of a bean?
byron
On Nov 12, 11:01 pm, "Dan Wilson" <[EMAIL PROTECTED]> wrote:
> Can you paste your buildFormCollections file
> inhttp://modelglue.pastebin.com?I'd like to have a look...
>
> DW
>
>
>
> On Wed, Nov 12, 2008 at 10:59 PM, byron <[EMAIL PROTECTED]> wrote:
>
> > The "helpers" feature in MG3 is great. However, I ran into an
> > interesting problem. Today, I was testing out Brian Kotek's
> > FormUtilities.cfc. I thought I'd be slick and place the cfc in the
> > helpers directory and call it using
> > helpers.FormUtilities.buildFormCollections(form). However I received
> > an error saying:
>
> > variables.instance.updateFormScope not defined.
>
> > Come to find out that the init() funciton of the cfc was not firing.
> > From there, I put it in its own directory, created a bean in
> > Coldspring for it, added it to the "beans=" on my controller, called
> > it using "beans.formutilities......" and worked like a charm.
>
> > So, if I'm understanding correctly, when referencing a cfc using the
> > helpers. feature, the init() is not fired. Is this the expected
> > behavior?
>
> > Thanks
>
> > Byron
>
> --
> "Come to the edge, he said. They said: We are afraid. Come to the edge, he
> said. They came. He pushed them and they flew."
>
> Guillaume Apollinaire quotes
--~--~---------~--~----~------------~-------~--~----~
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
For more about Model-Glue, check http://www.model-glue.com .
-~----------~----~----~----~------~----~------~--~---