Alex Purice
unread,May 8, 2012, 6:17:51 PM5/8/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to framework-one
Hello,
I found a very strange behavior in FW/1. Please use Hello3 example to
reproduce it.
#1. Add following file
hello3/views/main/myView.cfm, with following content
-------------------------------
This is my view.
-------------------------------
#2. In hello3/controllers/main.cfc, in default method, after
"name.default" service call, add following lines:
-------------------------------
variables.fw.setView("main.myView");
myVariable = myUndeclaredVariable;
-------------------------------
#3. Go do hello3/?reload=true , page will load OK (line myVariable =
myUndeclaredVariable was disregarded) and you will see "This is my
view." on the screen.
#4. Comments out variables.fw.setView("main.myView"); line and reload
the page. Now, as expected, you are getting an undeclared variable
error (after you will add error.cfm view).
So, basically, if you call setView framework method and have an
exception after the method call, this exception is completely hidden.
Can somebody explain me why it is happening...? It seems completely
weird. I took a look at setView function, it is pretty simple, just 3
lines of the code...
This is v2.
Thank you.
Alex