Allow dots instead of slashes in `event.setView` calls


Why not help the user fall in to the pit of success?


Luis Majano
April 29, 2020, 7:15 PM

I think this wil cause more issuess than success since you can use periods in your views.

Brad Wood
December 26, 2019, 11:58 PM

Moved to the ColdBox project.

Brad Wood
December 26, 2019, 11:57 PM

Thinking further on this, I actually think we’d have some backwards compat issues. A common convention back in the day was to have layout names like Layout.Default.cfm. ( I assume we’d treat views and layouts the same). Any app with a dot in a folder or file name would break when we start doing replacements.

Eric Peterson
December 26, 2019, 11:54 PM

I don’t think it hurts to allow both. ¯_(ツ)_/¯

And I did mean to create this in the ColdBox Platform project, but Jira sucks.

Brad Wood
December 26, 2019, 11:53 PM

Did you mean to create this in the CCM project?

As far as the ticket, I’m not a huge fan of the places where ColdBox already allows for dots and slashes (looking at you, run event) because I think it muddies the waters and makes the input even more confusing so the user isn’t even sure how they managed to get into the pit. It’s at least understandable when getting confused between a file path to a CFC and a CFC instantiation path since one represents the other. In this case, setView() is just a partial file path (no event names nor CFC paths involved) whereas the dots accepted by runEvent() have nothing at all to do with the file system or a CFC path and are following the [module:]handler[.index] pattern.

Won't Fix




Eric Peterson