Skip to content
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

Possible to reference outside-objects? #3

Open
ewindso opened this issue Oct 18, 2012 · 1 comment
Open

Possible to reference outside-objects? #3

ewindso opened this issue Oct 18, 2012 · 1 comment

Comments

@ewindso
Copy link

ewindso commented Oct 18, 2012

Hi there -- I know you haven't worked on this in 2 years, but it's exactly what I'm looking for! Is it possible say to reference objects that are outside of scope of the eval'd code, within the NSString? Essentially like Javascript:

var x = 3;
eval('x = 4');
alert(x); // 4

@ericentin
Copy link
Owner

That's not really possible since this is just a huge joke hack (that you probably shouldn't use for anything real). One thing you could do is change the OEEvaluator class so that it takes a parameter of type id, and then change OEEvaluation so you can pass an argument along. Then you could pass a dictionary to the eval'd string and refer to it by whatever you called the parameter in OEEvaluator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants