Luis Majano Forums Notification: Post to Depricated RC scope

Title: RE: Depricated RC scope
Thread: Depricated RC scope
Forum: Bugs (ColdBox)
Conference: ColdBox
User: lmajano

Hi guys,

First of all,
your chart of results is great PUC, thanks Sana for the

The reason for this error is that you are trying to set a variable
into the this scope of the event object. This is part of ColdFusion behavior
and not the framework. You can do something like this:

Handler: event.Luis =
"My Name"
View: #event.Luis# will render "My Name"
everything is ok and dandy.

However if I try: event.getValue("Luis")
it will fail!!

Well, that is why, you are directly manipulating the this scope
of the object, no the request collection. This is very dangerous for a request,
since you are not using the request collection as it should be used. remember
that the event object is not a scope it's an object and the way to interact with
it is via the methods.

So conclusion, NEVER EVER treat the event object like a
structure. Either use the methods or extract the collection to a reference