Helper Function not found

13 views
Skip to first unread message

mcraig

unread,
Feb 9, 2012, 11:35:34 AM2/9/12
to ColdFusion on Wheels
I just added a quick helper function that takes a boolean in and spits
a string back. I have one other helper function which works. Both
are sitting in views/helpers.cfm so they should be visible to all
views regardless of controller.

However (the name of the function is CheckedBoolean)...I get the error
below. The method signature does not seem to matter because it can
have no functionality at all and I get the same result, but here's the
signature anyway:

<cffunction name="CheckedBoolean" access="public" returntype="string">
<cfargument name="rawBoolean" type="numeric" required="true" />
</cffunction >

I have closed the browser, cleared cookies, reloaded...I seriously
hope I'm just being a complete blockhead...but I cannot see anything
wrong! Help!

Mike....

ERROR-----------------------------------------------------

Variable CHECKEDBOOLEAN is undefined.

The error occurred in C:\inetpub\wwwroot\ccr\views\HCS\gforce.cfm:
line 51
Called from C:\inetpub\wwwroot\ccr\wheels\global\cfml.cfm: line 138
Called from C:\inetpub\wwwroot\ccr\wheels\controller\rendering.cfm:
line 498
Called from C:\inetpub\wwwroot\ccr\wheels\controller\rendering.cfm:
line 257
Called from C:\inetpub\wwwroot\ccr\wheels\controller\rendering.cfm:
line 68
Called from C:\inetpub\wwwroot\ccr\wheels\controller\processing.cfm:
line 98
Called from C:\inetpub\wwwroot\ccr\wheels\controller\processing.cfm:
line 60
Called from C:\inetpub\wwwroot\ccr\wheels\dispatch\request.cfm: line
166
Called from C:\inetpub\wwwroot\ccr\wheels\index.cfm: line 1
Called from C:\inetpub\wwwroot\ccr\index.cfm: line 1
Called from C:\inetpub\wwwroot\ccr\wheels\events\onrequest.cfm: line 1

49 : <tr>
50 : <th width="20">
51 : <cfset checkValue = CheckedBoolean(params.allvehicles) />

mcraig

unread,
Feb 10, 2012, 9:09:58 AM2/10/12
to ColdFusion on Wheels
Still have not figured out why this
happened...Bueller....Bueller....Bueller

Chris Peters

unread,
Feb 10, 2012, 9:33:57 AM2/10/12
to cfwh...@googlegroups.com
Not sure what to tell you. What if you add a specific scope like this?
<cfset checkValue = variables.CheckedBoolean(params.allvehicles) /> 

--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.


tpet...@gmail.com

unread,
Feb 10, 2012, 10:02:55 AM2/10/12
to ColdFusion on Wheels
seems like the function isn't returning anything:

<cffunction name="CheckedBoolean" access="public"
returntype="string">
<cfargument name="rawBoolean" type="numeric" required="true" /
>
<!--- where the cfreturn statement --->
</cffunction >

also, try first renaming your helpers.cfm and creating a new one with
just this method in it. see if something inside your current
helpers.cfm is causing it to be renamed or something.

another thing to try is to just place the method inside your
controller.cfc and see if the method is available to you then.

mcraig

unread,
Feb 10, 2012, 12:32:32 PM2/10/12
to ColdFusion on Wheels
Forgot to included it as part of my signature in the example code, it
is returning something...would have been nice if I had just overlooked
it.

Mike

On Feb 10, 10:02 am, "tpetru...@gmail.com" <tpetru...@gmail.com>
wrote:

mcraig

unread,
Feb 10, 2012, 12:34:43 PM2/10/12
to ColdFusion on Wheels
Tried that and now I get a CheckedBoolean method was not found.
Groan. I'm stumped and very concerned since I went way beyond the
call of duty to get this client to sign off on this framework...now I
can't create helpers on the fly? Groan more. Not yelling, just
venting. There must be something I'm overlooking but for now I'll
just have to work around it until it comes up again or I'll miss my
next milestone.

On Feb 10, 9:33 am, Chris Peters <chris.pet...@liquifusion.com> wrote:

Per Djurner

unread,
Feb 10, 2012, 12:39:07 PM2/10/12
to cfwh...@googlegroups.com
Make sure you don't have trusted cache or anything like that turned on that would make CF not pick up the function as being there.

mcraig

unread,
Feb 10, 2012, 12:40:02 PM2/10/12
to ColdFusion on Wheels
AH HA HA HA....I am such an idiot...would you believe. Never
mind...wheels is elegantly simple and I'm the complexity. If you ever
write a book about CF for Idiots...I can write a page or two of it :)

Thanks guys.

Mike

On Feb 10, 10:02 am, "tpetru...@gmail.com" <tpetru...@gmail.com>
wrote:

tpet...@gmail.com

unread,
Feb 10, 2012, 2:47:36 PM2/10/12
to ColdFusion on Wheels
good call per!
Reply all
Reply to author
Forward
0 new messages