New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using var with local ends up in Expression Error #73

Open
constantin-mike opened this Issue Jun 18, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@constantin-mike

constantin-mike commented Jun 18, 2018

Hello,

I am working on a project with some old CF code. It actually is a library used as foundation for a bigger project. The library is code-versioned on svn where I am not supposed to change anything.
They have code like this: <cfset var LOCAL.foo = 'bar'>.
Horrible, yes i know.
Problem is, with ACF11 it's working, no problem at all. With OpenBD (which I absolutely love as dev environment) i get Expression Error.
I have searched the net, tried everything (tuned the OpenBD settings a little bit on variables & scopes) without any result. I understand that there's a conflict between the variables and local scopes, but somehow it's working on ACF11.

Please, please, please ... would there be any way to fix this without changing the old code from the library, in such a way to work with OpenBD? Today i've tried installing CF2016 dev + IIS & crap on a Win10 machine ... i was not able to make it work. With OpenBD everything is so simple.

Many thanks in advance.
Many thanks for this wonderful tool!

@wua22

This comment has been minimized.

Member

wua22 commented Jun 19, 2018

Hi,

The issue is that OpenBD only supports a single identifier in a var assignment like this. The parser doesn't allow for the "LOCAL." prefix.

If you could modify the CFML, then the workaround would be to change the lines to:
<cfset var LOCAL = {}> <cfset LOCAL.foo = 'bar'>

Unfortunately it's not a quick fix to the OpenBD code and I don't have the bandwidth at the moment to address it.

Sorry I couldn't be more help.

Andy

@dtsw

This comment has been minimized.

Contributor

dtsw commented Jun 19, 2018

in the meantime, i might be able to help you with CF2016 dev + IIS. Feel free to contact me.

@constantin-mike

This comment has been minimized.

constantin-mike commented Jun 19, 2018

No problem, thank you for your reply.
For the moment i am trying CommandBox, seems pretty cool too.
OpenBD is still a very useful piece of software, I will keep an eye on it.
I find it cool because it works out-of-the-box, it's integrated, has a lot of features etc!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment