User login

Railo/Coldfusion can't use function postType that exists in an in-scope CFWheels view helper

In short: POSTTYPE() has "No matching Method/Function"... even though i just defined it. If i define/call it with a different name, it works.

Railo Error (expression)

Message No matching Method/Function for POSTTYPE()
Stacktrace The Error Occurred in
/home/ben/code/gymnet/views/feed/_display_feed.cfm: line 3

    1: <div class="feed">
    2: <cfoutput query="statuses">
    3: <cfset postType = postType()>

Here's the function, plainly defined in views/feed/helpers.cfm:

<cffunction name="postType">
  <cfreturn "huh">

It was seeing it, it seemed, until i removed the arguments (passing in a status struct that didn't . But it didn't start working when i put back an argument (without a type defined, it only worked when it was type="struct").

Still didn't work in helpers/functions.cfm

Started working when i changed the function name to postWTFType(). Don't think there's anything i have to add to that.


Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.